• Get your esp8266 to do a http.get to your remote server. The IP of the request on your remote server will be your current public IP address.

    Anternatively, you can use a Dynamic DNS service, like https://www.noip.com/ . They offer a free service - although you have to update every month. This means that you can use a DNS name and this name will get updated to you current IP.

    You will also need to port forward on your router so that a request on your router gets forwarded to the esp8266. As @Ollie suggested on another thread - it's best to give your esp8266 a static IP based on the MAC address so you know what address to forward too.

  • thanks for your help. Yeah I can get the that IP via the get request on the server end. but this is more like a passive way of getting the ip. I want to be able to get the ip right in the esp8266 as soon as the public ip is changed and send it right away to the cloud.

    so back to my original question is it impossible to get the external ip from the esp8266?

About

Avatar for Wilberforce @Wilberforce started