I want two Arduino Yuns in different private networks to communicate, i.e., behind two distinct routers of which at least one does not have dynamic DNS, so its external IP may change from time to time.

To be reachable, this Yun could forward its router's external IP to the other Yun which has a fixed DNS name. But for this to work, it must be able to determine its router's external IP.

  • How can the Yun find out that the external IP of the router has changed? The Yun will be runnning all the time.

  • If the external router IP has changed (i.e., my Fritz.Box disconnects in the night and may receive a different IP when it reconnects), how can the Yun determine the new external IP?

If this is not the right place to ask, I'm happy for pointers to somewhere else (Server Fault SE forum?).

  • See this, pretty much what you want: stackoverflow.com/questions/3097589/…
    – Devrope
    Apr 8, 2015 at 19:54
  • @Devrope This looks promising, but I can't try right now. Thanks a lot! Apr 8, 2015 at 20:22
  • You could use Dyndns Service like noip.com (free for basic service) and do the publishing of the new IP within the FritzBox. On the Arduino use just the hostname you specify at the dyndns service.
    – ott--
    Feb 5, 2016 at 19:44

1 Answer 1


You can write a program that updates its own external IP every couple of minutes/hours, or when it doesn't get a response from another Yún/PC/server.

You can use this link (or find another site of the web that gives you your external IP address): http://www.realip.info/api/p/realip.php

This link has a beautifully formatted information that you can easily extract. I have a similar solution on one of my servers that have a dynamic IP...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.