OpenWrt Forum Archive

Topic: ip detection issues with ddns

The content of this topic has been archived on 11 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

hi.. i am not a developer, but i consider this topic could be relevant to some ... this text was extracted from HERE, but i think would be better in its own thread

in Designated Driver, nslookup provided by busybox behaves weird... it uses the resolver declared in /etc/resolv.conf regardless any dns server you can specify trought parameters (read this please) ...

imagine the following scenario:

  • with a public domain name, i have a dmz/port-forwarding exposed server

  • i declare it in 'hostnames' with the public domain and his private ip to speed up connections and enhance availability trought my lan

  • i want ip detection take the public ip instead, adding the 'dns_server' option to ddns config

the above will fail because the command passed to shell (say "nslookup mydomain.com 8.8.8.8") will ignore the specified dns server, and still return the the private ip what is different because belongs another segment, appearing an update is always needed and worst, passing the private ip to update url...

... does anybody know a simple and efficient way to surpass this flaw? maybe a fixed nslookup?.. thanks

(Last edited by atesin on 17 Dec 2016, 15:41)

The truth is that nslookup compiled with musl still doesn't use given dns-server.
You need to install "hostip" or "drill" or "knot host" or "bind host" if you need to use specific dns-server.

The discussion might have continued from here.