Greetings,
Thank you for answering my previous question about phones and BLE. I purchased your course “Learn ESP-32 w/Arduino IDE” and see in module 4 that in using the ESP-32 as a web server you must connect over the LAN. Later in module 4, unit 7 talks of accessing it from anywhere, but states you need to keep a computer turned on. If I have a static WAN IP would it be possible to connect to and control the ESP-32 from WAN directly? Without a DNS service, and having to have a computer turned on?. If so, could you please direct me to where I would be able to learn how to do this?
Hello Stephen,
Yes! You can totally expose the web server running on your ESP32 outside your home network. And you don’t need to leave a computer on. Your local network router will take care of routing the packets coming from outside (addressed on your static WAN IP address) to your ESP32.
I suggest you read the following article to better understand how things work:
How to Forward Ports on Your Router
Simply redirect requests that arrive on port 80 of your router to port 80 of the IP address of your ESP32.
To make things a little more secure, you can choose not to expose port 80 of your router, but choose another one so that the curious can’t easily access your ESP32. For example, you could choose to expose port 1234 on your router, and redirect traffic addressed to this port to port 80 of your ESP32.
However, this precaution would require you to access the ESP from the outside with the following URL:
http://[the_static_WAN_IP_of_your_router]:1234/
Hi Stephen.
As Stéphane mentioned, you can use port forwarding.
We don’tn have any tutorial about that subject, but the link suggested by Stéphane is a good resource.
Regards,
Sara
Thank you Sara, and Stephane,
I really appreciate you taking the time to help me. I am totally new to this stuff, and I am not even familiar with using forums yet. I decided to just put this WAN project on hold, and start with something I thought would be simpler (Converting a MAX-13855 thermocouple module’s output to display Fahrenheit instead of Celsius), but I am even having problems with that (I can multiply it by 1.8, but can’t add 32 to it). I don’t know how to code properly. I will continue to try and figure this out, and go on from there. Thank you again for your help.
Steve