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


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):
https://www.dd-wrt.com/phpBB2/viewtopic.php?p=70161



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@192.168.11.1


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




7 comments:

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

Anbarasan14 said...

I feel really happy to have a look at your blog and thanks once more for all the details that is being shared.
English Speaking Classes in Mulund West
IELTS Classes in Mulund
German Classes in Mulund
French Classes in Mulund
Best Spoken English Classes in Chennai
IELTS Coaching Centre in Chennai
English Speaking Course in Mumbai
IELTS Coaching in Mumbai
Spoken English Class in T Nagar
IELTS Coaching in Anna Nagar

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

buywirelessrouternow said...

Has anyone sampled the various product mentioned here, and can they tell which one is the best?
https://buywirelessrouternow.com/best-modeling-amps/

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