DDNS - `option ip_source` and `option ip_url` behind 0 to n NATs

I am trying to set up a DDNS service on my router TP-link C7 v5 running on OpenWrt and found this forum post:

[Solved] DDNS on LEDE behind ISP router detects private ip

There, OP wants to put his OpenWrt behind another router. So the trick he needed was to:

  • use
option ip_source "web"
option ip_url "https://ipv4.wtfismyip.com/text"
  • but to strike out (as unnecessary and potentially interfering)
option ip_source "network"
option ip_network "wan"

My questions are:

  1. option ip_source and option ip_url would work if the router were directly facing the Internet? (I don't see why not as the source is fully spelled out.)

  2. Those options would work if two or more NATs intervened between Internet and router?

  3. I could use https://ipecho.net/plain instead of the wtfismyip.com source? (That is to say, wtfismyip.com is not some chosen vendor to OpenWrt.)

  4. Is there a way to put both sources in, just in case one of them goes bust?

  5. What would be consequence of multiple DDNS entries (scripts), all using the same DDNS subdomain, but one using option ip_source "network" and option ip_network "wan", a second using https://ipecho.net/plain, and a third using wtfismyip.com. (The idea is to provide for all contingencies. If the router were facing the Internet and both the named sources are out of service, at least it could use the general network/wan path. Of course the danger would be to confuse the machine!)

Question 2 is mere curiosity as I don't plan to put this router behind multiple NATs. Thanks.

Yes, if the router has the public IP on the wan interface.

No.

You can use many urls to detect your IP, including those 2 that you mentioned.

Nope. But you could setup a secondary name to use the other source.

It doesn't sound like a good idea to me. You could get banned from hammering the ddns server from the different if the interface detects the change, but the url is delayed.

1 Like

Thank you. On question 2, why can't the script get through two layers of NAT? I would have thought the script could do that if the router can, and the router can get through any number of NATs to reach the Internet?

If you are behind NAT, then only the URL option could work, not probing the interface. And if you are behind CG-NAT then it won't work at all.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.