Friday, September 4, 2015

dynamic DNS on DD-WRT won't update after power up / boot

my setup is a dsl modem with a DD-WRT based buffalo router, configured to use DDNS to connect to dyndns.org. i've tried the modem in both bridge mode and router mode. after a cold start, ie after both the modem and router have been powered down and the phone line disconnected, the IP address doesn't always get updated and the "DDNS Status" log shows:
Thu Jan 1 00:00:50 1970: INADYN: Started 'INADYN Advanced version 1.96-ADV' - dynamic DNS updater.
Thu Jan 1 00:00:50 1970: INADYN: IP read from cache file is 'xx.xx.xxx.xx'. No update required. 

the problem appears to be a race condition between the new IP address being assigned and the DDNS check (the "thu jan 1" date suggesting the time of day hasn't updated either). a fix is suggested by:

http://www.dd-wrt.com/phpBB2/viewtopic.php?p=886044
Go to: Administation-> Management 
In Additional Cron Jobs write: 
*/10 * * * * root /usr/sbin/inadyn /tmp/ddns/inadyn.conf > /dev/null 2>&1 

which runs the inadyn command every 10 minutes using cron. i've just applied/saved this setting. the DDNS updated immediately after applying this. since the problem was intermittent, i can't know if it's solved. if the problem reoccurs, i'll update this post




No comments: