Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

server - How to get access to ESP8266 ( NODEMCU ) served website outside local network?

I'm able to connect my ESP8266 to local network, serve a website and access it on my mobile using the local IP address. So I tried getting my Public IP using api.ipify.org and use it to access the nodemcu server outside my local network but I couldn't access the website using my public ip.

How to expose my nodemcu server to the internet rather than just local network ?

Would love any code based solution not involving 3rd party services.

THANKS IN ADVANCE

question from:https://stackoverflow.com/questions/66065182/how-to-get-access-to-esp8266-nodemcu-served-website-outside-local-network

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The concept is port forwarding.

First you need to know your public IP using https://www.whatsmyip.org/

Second, access the router settings where you want the ESP8266 to connect

Third, navigate to the "forwarding" tab then Virtual server. there you can input the public IP address and the Port you want to expose to public.

Finally, access the ESP8266 anywhere by typing the IP:Port in the browser


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...