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

DDNS (DYNDNS) did not Update

Discussion in 'HyperWRT Firmware' started by prowler1968, Mar 17, 2006.

  1. prowler1968

    prowler1968 Network Guru Member

    Thibor - Thanks again for all the upgrades you've made to the firmware. It's the best. :thumbup:

    I had upgraded to the Thibor 13d and had it running for 2-3 weeks. This revison of the firmware supported the 28 day update interval for dyndns.

    Before the 28th day, I upgraded the firmware to Thibor 14 (I did not clear nvram after this update)

    After day 28, I checked my dyndns account and it did not update. Can you tell me if the upgrade caused this failure to update? Maybe it reset the variable that would store the next update time? I used nvram show to view the contents of the variables and only came across one variable that seemed to be a time stamp, ddns_cache, but the info. does not appear to be any valid date/time/counter that I can tell.

    ddns_cache=1142610556,xx.xxx.xx.xxx (my ip)

    Any thoughts are appreciated! Do I need to clear the nvram and re-enter my settings so this will working in the future?
     
  2. dvaskelis

    dvaskelis Network Guru Member

    I not at all positive with this, but it looked to me like it updates DDNS after the router gets an address during boot-up. So, after you updated to Thibor14, and the router rebooted, it probably got an address and the 28-day clock started again.
     
  3. mmisnan

    mmisnan Network Guru Member

    Received an email from dyndns.org last week asking me to update my dyndns IP address or else loosing it .. and I thought when I upgraded mine to Thibor14, this will be done automatically.. doesn't seems that way I guess. Thibor, is it possible to have an option to manually update or change the duration of update in the ddns page?
     
  4. Thibor

    Thibor Super Moderator Staff Member Member

    check /tmp/ddns.conf
    there should be an entry named "maximum-update" or something like that. i don't use ddns myself, or have an account, but i'll look into why it isn't working. btw, how long ago did you flash? i think the update timer starts from the last successful update.
     
  5. mstombs

    mstombs Network Guru Member

    I'll find out if this version works in a couple of days!

    Code:
     	Firmware Version :   	v4.70.8, Hyperwrt 2.1b1 + Thibor13d [Feb 11 2006]
    Uptime :   	26 days, 23:53:01
     
  6. mmisnan

    mmisnan Network Guru Member

    I've the following entry in /tmo/ddns.conf

    max-interval=2419200

    Is that in minutes or seconds? Anyway, I flashed to thibor14 a day after it was released.

    The following is from my dns.cache

    # cat /tmp/ddns.cache
    1142024780,213.106.XXX.XXX

    Couldn't make up what is the first part before the IP address.. is that the datetime stamp in Unix format?

    Fri, 10 Mar 2006 21:06:20 GMT .. ahaa... I received email from dyndns.org on Fri 10th March too (10am) .. So I guess thibor14 was trying to update it again on the same date but at later time ..
     
  7. Thibor

    Thibor Super Moderator Staff Member Member

    max-interval=2419200=28 days
     
  8. prowler1968

    prowler1968 Network Guru Member

    I updated to Thibor 14 only about 1 week ago. However, I upgraded from 13d just before it was due to update the DYNDNS.

    If the firmware flash causes the counter to reset, then that explains the failure of the scheduled update. I should see if the update goes as scheduled ... in about 22 days.

    Any idea if there is a variable that stores the last successful update?
     
  9. mstombs

    mstombs Network Guru Member

    Nope didn't update

    Code:
    Firmware Version :   	v4.70.8, Hyperwrt 2.1b1 + Thibor13d [Feb 11 2006]  	   	 
      	  	  	Current Time :  	Fri, 24 Mar 2006 22:58:48 	  	 
     	 
      	  	  	Router Name :  	WRT54GS  	  	 
      	  	  	Host Name :  	  	  	 
      	  	  	Domain Name :  		  	 
    
    Statistics
    	  	  	 
      	  	  	Uptime :  	33 days, 00:06:01
    From dyndns:

    Code:
    IP in Database/DNS:  	 xxx
    Last Updated: 	Sun Feb 19 17:32:28 2006
    I'm downloading the source code now - would be a miracle if I could understand it though!
     
  10. mstombs

    mstombs Network Guru Member

    Can miracles happen?

    Is it possible that the ddns code only runs once when called from the web screen or when DHCP detects a change in IP?

    In ddns.c

    Code:
    	char *argv[] = {"ez-ipupdate",
    	      //"-i", nvram_safe_get("wan_ifname"),
    	      "-D",
    	      //"-P", "3600",
    	      "-e", "ddns_success",
    	      "-c", "/tmp/ddns.conf",
    	      "-b", "/tmp/ddns.cache", 
    	      NULL };
    	ret = _eval(argv, ">/dev/console", 0, &pid);
    This runs the update code once

    I can manually run the ip update with

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

    but I think it needs the "-d" parameter to run as a daemon, ("-P" defaults to 1800 = 30mins) and also the "-i" parameter to specify an interface (which I'm not too sure about) - so I am currently trying this command

    ez-ipupdate -c /tmp/ddns.conf -b /tmp/ddns.cache -i vlan1 -d

    and will report back in 30 days!

    Would it be better not to use the daemon but some other timer to run the code every 30mins?
     
  11. mstombs

    mstombs Network Guru Member

    For anyone who is brave enough to try this - I can't build firmware - yet! I believe the solution to this dyndns not updating bug is to uncomment the commented out lines in this bit of ddns.c, and add a lowercase d (daemon). Debug doesn't seem to do much but increases a buffer size so probably wise to leave it!

    ie change from

    Code:
    	char *argv[] = {"ez-ipupdate",
    	      //"-i", nvram_safe_get("wan_ifname"),
    	      "-D",
    	      //"-P", "3600",
    	      "-e", "ddns_success",
    	      "-c", "/tmp/ddns.conf",
    	      "-b", "/tmp/ddns.cache", 
    	      NULL };
    
    	ret = _eval(argv, ">/dev/console", 0, &pid);
    to

    Code:
    	char *argv[] = {"ez-ipupdate",
    	      "-i", nvram_safe_get("wan_ifname"),
    	      "-d",
    	      "-D",
    	      "-P", "3600",
    	      "-e", "ddns_success",
    	      "-c", "/tmp/ddns.conf",
    	      "-b", "/tmp/ddns.cache", 
    	      NULL };
    
    	ret = _eval(argv, ">/dev/console", 0, &pid);
    -P sets the check interval defaults to 1800 = 30mins, 3600 = 1 hour seems often enough!

    I'm testing the daemon with the run command

    Code:
    ez-ipupdate -c /tmp/ddns.conf -b /tmp/ddns.cache -i vlan1 -D -d -P 3600
    which seems to be the correct interface on a cable connection using dhcp (on adsl may be "eth1"?)

    and will report back in 28 days if I can keep my router powered up and my ISP doesn't change my IP. A dhcp change will stop the daemon by issuing a kill command, already in the code:-

    Code:
    killall -9 ez-ipupdate
    which is one way I can currently check if the daemon is running - if the kill command works there's no output - but if the task is not running it says it can't find it! To confirm the task i still running I found the command "ps"

    Code:
      PID  Uid     VmSize Stat Command
        1 0           684 S   init noinitrd 
        2 0               SW  [keventd]
        3 0               SWN [ksoftirqd_CPU0]
        4 0               SW  [kswapd]
        5 0               SW  [bdflush]
        6 0               SW  [kupdated]
        9 0               SW  [mtdblockd]
       23 0           440 S   resetbutton 
       59 0           336 S   syslogd -L 
       63 0           344 S   tftpd -s /tmp -c -l 
       64 0           304 S   klogd 
       70 0           752 S   httpd 
       73 0           492 S   nas /tmp/nas.lan.conf /tmp/nas.lan.pid lan 
       77 0           384 S   ses -f 
       92 0           508 S   dnsmasq 
      118 0           520 S   process_monitor 
      129 0           532 S   upnp -D -L br0 -W vlan1 -S 0 -I 60 -A 180 
      131 0           328 S   cron 
      138 0           368 S   udhcpc -i vlan1 -l br0 -p /var/run/wan_udhcpc.pid -s 
    24531 0           340 S   ez-ipupdate -c /tmp/ddns.conf -b /tmp/ddns.cache -i v
    24743 0           400 S   /bin/sh /tmp/.webcmd.sh 
    24744 0           324 R   ps 
    of course there may be a reason why this wasn't implemented before?
     
  12. mmisnan

    mmisnan Network Guru Member

    Received an email saying that my dyndns account hasn't been updated yet .. and the last time I updated it was on the 10th/March .. surely its more than 28 days now. Confirmed now that ddns doesn't work on thibor14.
     
  13. Thibor

    Thibor Super Moderator Staff Member Member

    thanks, i'll change ddns.c
     
  14. mstombs

    mstombs Network Guru Member

    Code:
    # ps
    
      PID  Uid     VmSize Stat Command
        1 0           788 S   init noinitrd 
        2 0               SW  [keventd]
        3 0               SWN [ksoftirqd_CPU0]
        4 0               SW  [kswapd]
        5 0               SW  [bdflush]
        6 0               SW  [kupdated]
        9 0               SW  [mtdblockd]
     7407 0           752 S   httpd 
     7559 0           440 S   resetbutton 
     7594 0           336 S   syslogd -L 
     7599 0           344 S   tftpd -s /tmp -c -l 
     7600 0           304 S   klogd 
     7605 0           528 S   nas /tmp/nas.lan.conf /tmp/nas.lan.pid lan 
     7612 0           384 S   ses -f 
     7625 0           516 S   dnsmasq 
     7651 0           520 S   process_monitor 
     7662 0           532 S   upnp -D -L br0 -W vlan1 -S 0 -I 60 -A 180 
     7664 0           328 S   cron 
     7671 0           368 S   udhcpc -i vlan1 -l br0 -p /var/run/wan_udhcpc.pid -s 
     7709 0           340 S   ez-ipupdate -c /tmp/ddns.conf -b /tmp/ddns.cache -i v
    24983 0           400 S   /bin/sh /tmp/.webcmd.sh 
    24984 0           324 R   ps 
    ez-ipupdate still running in daemon mode here (have to restart it if change something on the web interface), but got another 2 weeks to wait to see if it updates dyndns!

    NB Tarifa firmware has the same issue.
     
  15. Thibor

    Thibor Super Moderator Staff Member Member

    i've now changed ddns.c to "-d" instead of "-D", which to be honest makes more sense. i think maybe an error on linksys' part
     
  16. prowler1968

    prowler1968 Network Guru Member

    Is the code change that fixes the DDNS update going to be available in the 14 version firmware, or is this going to be in the upcoming version 15?
     
  17. Thibor

    Thibor Super Moderator Staff Member Member

  18. mskreis

    mskreis Network Guru Member

    So, is it confirmed that this is not working properly for v 14? I assume this is the reason that my IP address changes are not being noted on dyndns.org.
     
  19. Thibor

    Thibor Super Moderator Staff Member Member

    no, it is not confirmed to be not working. the changes to the running mode would help if your ip does NOT change. it ought to update if the wan ip changes, and has always been the case
     
  20. mstombs

    mstombs Network Guru Member

    Agreeing with Thibor, my dyndns problem is that my IP rarely changes, another 8 days to go to see if my manually started task does do it.

    I can't easily force an external IP change - I can clone a mac address on the router and then reboot the cable modem - which I'm pretty sure does work but that's not the same as just changing the IP address remotely.
     
  21. mskreis

    mskreis Network Guru Member

    OK, then I think I need some help. My 54GS is connected via the WAN port to an Actiontec DSL modem. I've manually set the Internet IP to 192.168.0.4 and have enabled DMZ hosting on my DSL modem. My Modem IP address changed over a week ago but the change was not updated on dyndns.org. Suggestions?

    Thanks
     
  22. Thibor

    Thibor Super Moderator Staff Member Member

    then your internet address wouldn't have been updated to a public ip, as your router cannot see it.
     
  23. prowler1968

    prowler1968 Network Guru Member

    Thibor -

    I can confirm that it does not work. My public IP has not changed in the past 6 months or longer. I updated from 13d to 14 just before it was due to update the DYNDNS record. After another 30 days (on version 14), I had to manually update my record at dyndns.com.

    One thing to note, however, is that the update from 13d to 14 was done without clearing nvram after the flash. This may have prevented the update somehow.
     
  24. jchuit

    jchuit Network Guru Member

    I am still busy working on the problem, but I think it is as follows:

    Why isn't the DDNS updated after a restart, or by a change in wan-ip?

    The webpage: ez-ipupdate gets it's info from file "ddns_cache" , this file is written and stored in nvram after the first time setup of DDNS. The ddns_cache keeps time and ip-info.

    The first ipupdate: The ddns_cache file is overwriten after an ipupdate in DDNS, but isn't backup'd to the nvram "ddns_cache". After a restart the old ddns_cache nvram is restored.

    The second ipupdate: the DDNS is not updated, obsolete data is still in nvram "ddns_cache", this will be used after a restart.

    Greetings,
    jchuit
     
  25. mstombs

    mstombs Network Guru Member

    I'm with Thibor on this one, on an IP change the ez-ipupdate task is 'killed' in the Linksys firmware, before being restarted (as far as I can read from the code!). Therefore it is expected to stay running, but it doesn't as it isn't started in daemon mode probably someone used '-D' and not '-d'. You also have to uncomment the "-i" statement.

    I don't see the ddns_cache being stale an issue to prevent update - surely this is more likely to encourage extra unnecessary 'abusive' updates on a reboot?
     
  26. jchuit

    jchuit Network Guru Member

    Backing up ddns_cache

    To mstombs

    You where right on the 'abusive' part, the present time is stored.

    After an successful ip update, iz-ipupdate runs the ddns_success command.

    The ddns_success_main backups the data to nvram, it stores the present time in ddns_cache. This should be the time/ipnr out /tmp/ddns_cache.

    After every reboot wrong data is stored.

    Greetings,
    jchuit
     
  27. mstombs

    mstombs Network Guru Member

    After

    Code:
     	Uptime :   	28 days, 07:34:08
    I found the following message in the "run command" window

    and the time now stored in ddns.cache converts to

    Sat, 22 Apr 2006 22:57:01 GMT

    so it looks like my daemon mode patch works.
     

Share This Page