I have a LEDE 17.01.04 router behind my ISP router on its own subnet.
I want to set up DDNS on LEDE (I have followed the guide for OpenWrt at DuckDNS), but even though I have set IP address source [IPv4] to URL and URL to detect [IPv4] to https://myexternalip.com/raw I can see in the log, that updates continuously fail, because the private IP is detected instead of the public:
002217 : Detect local IP on 'web'
002217 : Local IP '192.168.x.x' detected on network 'wan'
002217 : Update needed - L: '192.168.x.x' <> R: '8.8.8.8'
002217 ERROR : No or private or invalid IP '192.168.x.x' given! Please check your configuration
(I have manually set the ip with DukDNS to 8.8.8.8, so I will see when it is successfully updated)
I feel I have tried endless combinations of the settings, but no madder what I try I can not seem to fetch the right, public ip from the LEDE router. Any tips?
@ximibaba Yes, that is why I set IP address source [IPv4] to URL, which should retrieve the ip from a website. Visiting https://myexternalip.com/raw or https://ipv4.wtfismyip.com/text from a browser or executing curl https://ipv4.wtfismyip.com/text from the LEDE terminal all correctly displays my public IP.
@psherman Thanks for your tips. Both wget and curl are installed on the LEDE router.
My /etc/config/ddns:
+1 to what @Per said. That might be messing things up. I'd also recommend removing the 2 lines that are commented out (just in case they are not being ignored for some reason or another).
in my config, I have the following interface and IP definitions (obviously the url itself is specific to my config):
Also, if you don't already have it, there is a LuCI app for ddns. IIRC, it has a wizard for configuration that generally works well for many service. Further, it can be useful for debugging.