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 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 ''. 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:
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

edit 2018.01.24:

i ended up disabling the cron job years ago, i believe because i was worried about the logs filling up memory. or perhaps because it resulted in multiple inadyn processes running. at this point, i'm still not sure if it ever really (since the problem is so intermittent) worked

i just disabled the external ip check

but i understand the fundamental issue better now than i have. inadyn is running, but failing to recognize that the cached value differs from current value. there's a verbose option for the config file, but i don't currently have it enabled (the UI doesn't have an option for it). i believe that there's a way to use the nvram tool to manually fix it, ie without the UI, but i haven't delved into it yet

good description of how to force inadyn to restart shortly after booting (to allow it to pick up the correct ip address):

an unrelated issue is that the sshd running on the router only supports a no-longer-current encryption method and ssh by default refuses to connect, so need to use a workaround

ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 root@

(i provided a public key, but it's likely that this would work for password-based login too)


velraj said...

Thanks for sharing the article. Keep sharing your ideas with us.
Struts Training in Chennai
Struts course in Chennai
Struts Training center in Chennai
struts Training in Anna Nagar
Wordpress Training in Chennai
Wordpress Training Institutes in Chennai
Spring Training in Chennai
Hibernate Training in Chennai

Gautam krish said...

Blog presentation is really awesome... Thanks for your blog...
best java training in coimbatore
java classes in coimbatore
Java Course in Bangalore
Software Testing Course in Coimbatore
Spoken English Class in Coimbatore
Web Designing Course in Coimbatore
Tally Course in Coimbatore

Anjali Siva said...

Excellent post, it will be definitely helpful for many people. Keep posting more like this.
Best ccna Training in Chennai
ccna Training in Chennai
ccna course in Chennai
Angular 7 Training in Chennai
AngularJS Training in Chennai
Ethical Hacking Training in Chennai
CCNA course in Ambattur
CCNA course in T Nagar
CCNA course in OMR

kaushik said...

Thank you for this awesome blog. You are giving a professional touch to your content. It makes your article worth reading. Looking forward to learn more from you.
Automation Anywhere Training in Chennai
Automation Anywhere course in Chennai
AWS Training in Chennai
Azure Training in Chennai
Cloud Computing Training in Chennai
Automation Anywhere Training in Vadapalani
Automation anywhere training in Guindy
Automation anywhere training in Thiruvanmiyur

Gabe Co Hadwin said...

Great Article. Thank you for sharing! Really an awesome post for every one.

IEEE Final Year projects Project Centers in Chennai are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation. For experts, it's an alternate ball game through and through. Smaller than expected IEEE Final Year project centers ground for all fragments of CSE & IT engineers hoping to assemble. Final Year Project Domains for IT It gives you tips and rules that is progressively critical to consider while choosing any final year project point.

JavaScript Training in Chennai

JavaScript Training in Chennai

tech bosa said...

I really like reading an article that can make men and women think. Also, thanks for allowing me to comment!
Click here to get More information.

kishore said...

Thanks for your unique post and Keep doing...
Oracle Training in Chennai
best oracle training institute in chennai
Corporate Training in Chennai
Embedded System Course Chennai
Unix Training in Chennai
Graphic Design Courses in Chennai
Pega Training in Chennai
Spark Training in Chennai
Excel Training in Chennai
Soft Skills Training in Chennai
JMeter Training in Chennai
Oracle Training in Anna Nagar

liftndriftpaperplane said...

Much obliged for sharing this brilliant substance. its extremely fascinating. Numerous web journals I see these days don't actually give whatever pulls in others however the manner in which you have plainly clarified everything it's truly awesome. There are loads of posts But your method of Writing is so Good and Knowledgeable. continue to post such helpful data and view my site too...
How to make a paper airplane | Origami paper plane | Boomerang Airplane | how to make a eagle paper airplane | Best paper airplane design for distance and speed | Nakamura lock paper airplane
Eagle paper plane | Zazoom | Easy Freezy