Hello,
I have a subnet 192.168.15.0/24, the router (RB2011) at .1 and a server at .2.
With my previous setup (OpenWRT) I just added the router wan interface’s dyndns hostname to point at 192.168.15.2.
This made all requests to host.dyndns.org go directly to the server at 192.168.15.2.
This can be done on the RB2011, no problem here and the result would work indeed nicely.
There is a slight snafu though, as I use the dyndns update script. It checks the hostnames ip, not from a wan dns-server, but picks it from the local static dns entries. It always points to 192.168.15.2, and is thus always different from the wan interface ip.
Is there any way around this?
All that would be needed is for the RB2011 to not use local static dns entries for one specific host
Replace
[:resolve $hostname]
in your script with
[:resolve $hostname server=8.8.8.8]
(you can use any external dns server instead of 8.8.8.8, but 8.8.8.8 is a good choice)
Now this doesn’t seem to work properly. 2 consecutive calls to “resolve host.dyndns.org server=x.x.x.x” resolve alternatively once to the local entry, once to the one delivered by the remote server.
I would even consider this a bug.
As docmarius commented, this does not work.
In one of ten it might, but other than that it keeps bombarding dyndns AND filling up the log.
Any other ideas?
I want to interrogate an external DNS server instead of the embedded one to get an address resolved.
This should resolve $hostname using server 8.8.8.8:
[:resolve $hostname server=8.8.8.8]
but it doesn’t always. It still gets in 50% of requests the locally defined static route.
The idea behind this is to allow a local static address for a dyndns address to ensure a kind of hairpin loop, and still check for the assigned dyndns IP via an external server in the dyndns script.