Thibor 15c and DynDNS

Discussion in 'HyperWRT Firmware' started by rdhw, Jun 6, 2006.

  1. rdhw

    rdhw Network Guru Member

    Today I received a warning from DynDNS that my DynDNS record had not been updated for 30 days.

    The DynDNS account shows that it was last updated Sat May 6 19:56:53 2006 (before 15c was installed, when it was an earlier Thibor firmware).

    The Linksys 54G says it is running firmware version:
    v4.71.1, Hyperwrt 2.1b1 + Thibor15c [May 12 2006]
    Current Time: Tue, 06 Jun 2006 11:14:34
    Uptime : 24 days, 13:07:10

    The router has not suffered any WAN DHCP IP configuration change since it last restarted.

    Should I have expected Thibor 15c to have automatically updated the DynDNS record 25 days (say) after May 6 (the last DynDNS update), or does it only time updates from the last reboot time (May 13)?
  2. grcore

    grcore Network Guru Member

    You have cable internet right?

    If your IP does not change, DNS is not going to update (it does not need to). It will run at boot time, (the WAN IP changes from to the DHCP address).

    Also, if you IP does not change after a period of time (say 90 days), I believe will complain that your IP has not changed. And your account can expire also.

    You can experiment by creating a ipupdate.conf file and run ex-ipupdate at boot instead of using the GUI (which uses a wrapper on ez-ipupdate). In there you can specify the duration between updates. But I do not think it will matter because is going to complain about the IP not changing.

  3. rdhw

    rdhw Network Guru Member

    grcore: things are not quite as you say. DynDNS accept updates with unchanged IP after 25 days without regarding that as abuse. DynDNS delete an account if it has not been updated after 35 days without a refresh. I thought that the Thibor code included fixes for automatically refreshing DynDNS after 25(?) days even without an IP change, that is why I am querying why it has gone for 30 days without a refresh. But I don't know the details of the intended functionality incorporated in the latest DDNS fixes in Thibor, and that would be useful to know.
  4. prowler1968

    prowler1968 Network Guru Member

    I have been running Thibor 15c almost from the day it was released. I was waiting for my 28 day period to be up to verify that the 28 day automatic update did occur, even without a change in the IP address.

    With prior versions, I would run for weeks and then receive a message for Dyndns stating that my account needed to be updated, even if the IP address did not change.

    Well, closing in on day 28 and the power went out for about an hour at my home. My DYNDNS account was updated after the power came back on with the same IP address I had been assigned for months. I assume the update was based on the router and the modem being re-initialized after the power outage and forcing an update at DYNDNS, even though the IP address did not change.

    Thibor did change the firmware to provide an automatic update interval of 28 days, but I have yet to make it 28 days between either Thibor creating another firmware build, or today, a power failure that started the clock again.

    Has anyone else made it to 28 days and confirmed the update occurs as required by DYNDNS, even without a change in IP address?
  5. 4char

    4char Network Guru Member

    I'm using 15c on wrt54gs v3.0 and the uptime is " 29 days, 02:59:18". I just checked my dyndns account (at 8:50pm June 10, 2006, it's GMT-8) and it says "Last Updated: Thu May 11 02:36:10 2006". It seems the router is not update the dyndns.

    P.S. The same IP address did not change though.
  6. Toxic

    Toxic Administrator Staff Member

    I'll get Thibor to reply to this, he is however busy with a new firmware for another product.

    btw nice to see you still about rdhw, your site is a great resource for NTL users!
  7. mstombs

    mstombs Network Guru Member

    Thibor did create a new vram variable for this, but it was not effective - there was already a default in the ez-update code.

    I've reported my findings elsewhere on these forums, but the problem is that the code used to update dyndns ez-ipupdate.c is not left running in 'daemon' mode. It does autoupdate correctly if you restart the task manually, but any change in setup or real IP change kills the task. Apparently there are problems for some connection types if run in daemon mode (but seemed OK for UK cable dhcp).

    Linksys patched the convoluted dyndns code at the last revision - it now could do with a complete re-write (but is beyond me!), most of the functions that ez-upupdate can do on a linux machine also seem to be done outside the function split across multiple ddns.c's, process_monitor.c and the patched ez-ipupdate.c!

    I suspect thibor firmware could be patched with a cron job that runs every 25 days (at most) and issues the command

    ez-ipupdate -c /tmp/ddns.conf -b /tmp/ddns.cache

    [NB this command can safely be entered via the admin run command, at present this tells me

    # ez-ipupdate -c /tmp/ddns.conf -b /tmp/ddns.cache
    ez-ipupdate Version 3.0.11b7
    Copyright (C) 1998-2001 Angus Mackay.
    no update needed at this time

    I believe such a repeated task could be created via startup commands

    but my linux/unix grasp doesn't enable me to do this!

    I'm happy to test if someone wants me to try!
  8. mstombs

    mstombs Network Guru Member

    I hate to answer my own question but I'm trying the following command in the startup script

    echo "11 23 * * * ez-ipupdate -c /tmp/ddns.conf -b /tmp/ddns.cache" >> /tmp/cron.d/my_dyndns
    which if my research is correct will run the command at 11:11pm every day.

    Problems I expect

    0. crontab will not accept the spaces in the command...
    1. The web screen status will not be updated
    2. The cache file won't be written back to vram so abusive updates will occur on reboot?
    3. Won't be able to tell whether it works for 25 days!


    Couldn't see if anything happening so this is attempt 2, which I can see is running:-

    echo "#!/bin/sh" > /tmp/my_dyndns
    echo "while true; do" >> /tmp/my_dyndns
    echo "ez-ipupdate -c /tmp/ddns.conf -b /tmp/ddns.cache" >> /tmp/my_dyndns
    echo "sleep 86400" >> /tmp/my_dyndns
    echo "done" >> /tmp/my_dyndns
    chmod 700 /tmp/my_dyndns
    /tmp/my_dyndns &
    which is supposed to run the dyndns updater every 24 hours after reboot - I can see it running via ps and the loop works in immediate mode - wonder where the output messages go when started from the startup?
  9. Thibor

    Thibor Super Moderator Staff Member Member

    you could do "00 0 1 * * ez-ipupdate -c /tmp/ddns.conf -b /tmp/ddns.cache" >> /tmp/cron.d/my_dyndns" which would instead run on the first day of each month at midnight(local time i think)
  10. mstombs

    mstombs Network Guru Member

    I thought about monthly but I think that means you still get the email from dyndns after 30 days at least. Depending on when your IP was lst updated ez-ipupdate wont update and your account will expire before the 1st of the next month.

    I'm pretty sure the ez-ipupdate code doesn't try to update if the IP address hasn't changed for 25 days so I think a daily try is needed to hit the window between 25 and 30 days?

    Thanks for your attention though Thibor - great firmware (and I know you don't use dyndns!) Is there an easy way to check that cron now takes commands with spaces? (can't execute crontab -l) If it doesn't I now know how to write a script file and give the name to cron!
  11. Lumute

    Lumute Network Guru Member

    I have an SL with Thibor 15b and dyndns does not seems to work...

    My host was already created but had an old IP so I just configured the account on the router but nothing, it is not updating it... the status on the setup page is just blank and if I go to the dyndns site it still shows the old IP.

    I tried rebooting the router, re-entering the password, releasing/renewing IP, but nothing...

    any clue?
  12. mstombs

    mstombs Network Guru Member


    There is a bug in the dyndns code (I guess in the Linksys source) which means that the the time saved in the nvram variable ddns_cache after bootup is "9", this corresponds to the following startup log message, before the time is correct

    Jan 1 00:00:09 (none) cron[128]: (CRON) STARTUP (fork ok)

    (year if displayed would be 1970!)

    As reported by Jchuit in Tarifa project section this info is not updated on subsequent good updates. So I'm now running this experimental startup script:-

    echo "#!/bin/sh" > /tmp/my_dyndns
    echo "sleep 60" >> /tmp/my_dyndns
    echo "while true; do" >> /tmp/my_dyndns
    echo "ez-ipupdate -c /tmp/ddns.conf -b /tmp/ddns.cache" >> /tmp/my_dyndns
    echo 'fbuf=$(cat /tmp/ddns.cache)' >> /tmp/my_dyndns
    echo 'if [ "$(nvram get ddns_cache)" != "$fbuf" ]; then' >> /tmp/my_dyndns
    echo 'nvram set ddns_cache=$fbuf; nvram commit' >> /tmp/my_dyndns
    echo 'echo "nvram updated" >> /tmp/my_dyndns.log' >> /tmp/my_dyndns
    echo 'else' >> /tmp/my_dyndns
    echo 'echo "no update" >> /tmp/my_dyndns.log' >> /tmp/my_dyndns
    echo 'fi' >> /tmp/my_dyndns
    echo "sleep 86400" >> /tmp/my_dyndns
    echo "done" >> /tmp/my_dyndns
    chmod 700 /tmp/my_dyndns
    /tmp/my_dyndns &
    which tries to keep the nvram variable up to date and keeps a log of what it does.
  13. CAOgdin

    CAOgdin Network Guru Member

    DynDNS Timeouts

    1. The workaround is to use the DynDNS client on any computer on the network to do the periodic update ( I set my copies (I have several at client locations) to refresh every five days.

    2. I have had lengthy dialog with Linksys, and they are obstinate about not addressing this issue. They still apparently believe that ISPs change IP addresses regularly. In fact, SBC/Yahoo assign an IP address lifetime of ten minutes...but they seldom change the address itself, that would trigger the report from router code.

    3. It would be a major convenience to HyperWRT adoptors to have this changed. It could be done by CRON...but, rather, I'd suggest it's probably easier to use CRON to reset the IP address saved in RAM to; within ten minutes, there will be an apparent change in IP address of record, thus triggering an update to DynDNS. (I'd schedule that CRON event to run every seven days at, say, 04:30 am on Sunday, a time when I'm not likely to be using the system.)
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice