1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Force DDNS update every 12 hours?

Discussion in 'HyperWRT Firmware' started by Menkatek, Jun 4, 2007.

  1. Menkatek

    Menkatek Network Guru Member

    I'm having trouble with DDNS on 15c (Gv2) updating with the latest IP change. It seems to attempt a connection once and if it fails, gives up forever. The problem is apparently addressed in the final Thibor 17 release, so in the meantime, I'd like to force the router to do a refresh every 12 or 24 hours.

    I think the solution was in this thread but the links are no longer valid. Would adding this to my startup script work?

    echo "00 0,12 * * * ez-ipupdate -c /tmp/ddns.conf -b /tmp/ddns.cache" >> /tmp/cron.d/my_dyndns"
    Any input appreciated, thanks.
  2. mstombs

    mstombs Network Guru Member

    I've updated a link of mine in that thread - but I don't think we were addressing your problem - the problem was not updating if IP not changed for 28 days - For which there is now a new fix - use dyndns free static IP addresses! You need to avoid 'abusive' updates which will get your account blocked, if the cache is working (by default it doesn't on router reboot) the ez-ipupdate only contacts dyndns.com if needed.
  3. Menkatek

    Menkatek Network Guru Member

    Hi mstombs. That is interesting because I have never had a problem with DDNS after a power cycle, which always gives me a new IP address. My ISP also does not let me keep an IP address for more than 3 to 4 days.

    My problem occurs about every month with two routers (same model/version) in different locations. It's very frustrating because one of them is away from me and I have to get someone to unplug/replug the router. I understand the need to avoid abusive updates. If there is a startup script that tries to connect to DynDNS every 5 minutes until it is successful, that would work as well. :frown:

  4. mstombs

    mstombs Network Guru Member

    The problem with the cache was identified and fixed by jchuit in Tarifa firmware I believe, only a problem if IP does not change on reboot (UK cable). Worked around by the scripts.

    The linked threads show how the ez-ipupdate can be run outside of the core firmware, I don't know how errors are handled though. You could try the same script because it leaves the ez-ipupdate running as a daemon, and creates a second cron task to restart the daemon when it gets killed.

    It seems to work for the real reason - I have just checked - it is still running and my dyndns.com is correct!
  5. Menkatek

    Menkatek Network Guru Member

    When I have more time, I will definitely try your script. Thanks mstombs.

    I would be interested to know how ez-ipupdate handles connection problems. It should keep trying until it is successful or the DDNS service refuses the login credentials.

    In the meantime, I will play it safe and use a DDNS update client.

    Thanks again for your help. :)
  6. mstombs

    mstombs Network Guru Member

    You can browse the c-code source with using www.google.com/codesearch and search for

    thibor15c ez-ipupdate

    The function clearly supports retries/ timeouts - not sure if they are set - suspect they default, but could be changed if you write your own conf file,

    There appears to be an nvram variable you can set to determine the timeout - not tried using it though.


Share This Page