I set on my router inside /etc/dnsmasq.conf rules that translates these domains to local ips within my LAN
address=/a.duckdns.org/10.0.1.1
address=/b.duckdns.org/10.0.1.2
etc...
so basicaly nslookup on openwrt router of a.duckdns.org points to 10.0.1.1
I dont think i understand description here >
The domain option is the domain held by the client, and 'nslookup $DOMAIN' should succeed and point to the client (or router it's behind) when everything is up to date; this is used as the check to see if $DOMAIN points to the clients public IP.
What is meant by client here? I have openwrt router (Wan public IP) ; and ddns is running on that router. Confusion...
Whats the point of the domain directive in configuration file?
I was assuming that using these lines ... once url command is called/executed all the above mentioned domains will be updated with ip address of wan interface, am i correct?
option interface "wan" #assuming wan is the public network
option update_url "http://www.duckdns.org/update?domains=[USERNAME]&token=[PASSWORD]"
i am trying to execute it on openwrt device which is connected via lan to main router ... so it has only
br-lan interface (local ip)
its failing ...
root@OpenWrt-test:/etc# 175558 WARN : Service section disabled! - TERMINATE
175558 WARN : Service section disabled! - TERMINATE
175559 ERROR : Can not detect local IP using network_get_ipaddr 'eth0' - Error: '1' - TERMINATE
i have almost identical setup on other openwrt ; i have wan port there but it has also local ip and all works fine ... so i dont get it at ALL.
(If's there's a relevant UCI config, most people won't know the config to alter the underlying package - and altering such running files can cause instability.)
root@OpenWrt-test:/etc# 181843 WARN : Service section disabled! - TERMINATE
181843 WARN : Service section disabled! - TERMINATE
181843 ERROR : Can not detect local IP using network_get_ipaddr 'br-lan' - Error: '1' - TERMINATE
181843 : Registered IP '78.xxxxx' detected
181843 info : Starting main loop at 2022-11-19 18:18
181843 : Detect local IP on 'network'
181843 ERROR : Can not detect local IP using network_get_ipaddr 'br-lan' - Error: '1' - TERMINATE
181844 WARN : PID '4835' exit WITH ERROR '1' at 2022-11-19 18:18
182153 : ************ ************** ************** **************
@lleachii
this is not working ... i mean using option name in dhcp config ... does nothing ... ;/ basically all hosts resolve to upper DNS ... so no local ip is provided ;/
assuming that dhcpd server on openwrt by default is dnsmasq.
what you actually want to achieve and what do you believe DDNS is doing for you?
it looks to me your case is most likely differs what usually DDNS is used for. i.e. usually if you have local service you want to expose over internet, meaning to access remotely, but your public IP is not fixed (like in case of 99,99% regular home internet access), than DDNS will find your current public IP and report to a public DNS service. thus way you can just refer to your domain remotely and still will be able to access your local service regardless of actual public IP address which is rotated by your ISP.
so the domain DDNS doc referring to is your custom domain, in your case a.duckdns.org. as the doc explains if the domain is correctly registered with your current public IP nslookup should respond that public IP.
Example:
let's assume you have summer house with internet access and owrt router. time to time you want to login remotely to that router [and you are not using other more secured method, so please do not do this! it is just an example] from your resident house.
as the summer house owrt (called routerB) public IP is not fixed, your ISP may change allocation of its public IP, obviously you cannot access routerB via IP as you will not know when it is changed and what is the latest public IP. but DDNS on routerB from time to time will check public IP and report to duckdns.org. so when from your resident location you want to access routerB it will be enough to reference to it as a.duckdns.org, you don't need to know the actual public IP.
hence pointing a.duckdns.org to a local IP of 10.0.1.1 makes no sense unless you want a split DNS setup.