dyndns problems

If your problem doesn't fall into one of the other categories, report it here.

Moderator: Moderators

hotzenpl0tz
Posts: 51
Joined: Thu Dec 18, 2008 1:11 pm

dyndns problems

Post by hotzenpl0tz »

Hi there, anybody else having problems with the dyndns updater service ?

I just noticed that my dyndns ip was poiting to the wrong host so I went to the webinterface and pressed the force update button, and noticed that somehow it told me the update was successful but the Last Update time stamp hadn't changed. I then logged into my dyndns account and saw that it really hadn't updated.

I then logged into the router with ssh and did the following:

/etc/rc.d/S90ddns_gargoyle restart

and I think that then updated my ip.

In my case, I have the folling cronjob to restart my internet connecteion every 24h at a set time of 6am - because most German providers automatically cap the internet connection after 24h and assign a new ip address.

0 6 * * * ifdown wan && sleep 2 && ifup wan

Seems like the included scripts didn't update the ip afterwards, so I guess I will have to do the following ?

1 6 * * * /etc/init.d/S90ddns_gargoyle restart

Is this the only solution or did I do something wrong entirely ? Thanks !

Eric
Site Admin
Posts: 1443
Joined: Sat Jun 14, 2008 1:14 pm

Re: dyndns problems

Post by Eric »

It's a bug. It should be fixed in the latest bleeding edge firmware. Thanks for reporting this!

hotzenpl0tz
Posts: 51
Joined: Thu Dec 18, 2008 1:11 pm

Re: dyndns problems

Post by hotzenpl0tz »

Thanks for the quick fix ! Do you have any changelogs (or svn commit logs?) up for your experimental/bleeding edge firmwares ? Since I am modifiying some of your files for my qos-layer7 stuff updating always becomes a bit more painfull then a simple save/restore of the configuration - would be nice to be able to check if there are any additions/fixes that aply to my wrt54gl and usage.

Eric
Site Admin
Posts: 1443
Joined: Sat Jun 14, 2008 1:14 pm

Re: dyndns problems

Post by Eric »

The SVN revision log can be found at http://trac.assembla.com/gargoyle-router/log/

Do be aware, however, that I won't necessarily upload a new bleeding edge firmware for every SVN commit. Any time I think a major bug has been fixed or a new piece of functionality is working properly (or at least, available for testing) I'll upload something new, but there are no guarantees with regard to this, unless I specifically state somewhere that a change is in the latest firmware. If you feel you really need the latest SVN fixes, the best way to get them is to just check out the code from the SVN as described in the download section and build it yourself.

hotzenpl0tz
Posts: 51
Joined: Thu Dec 18, 2008 1:11 pm

Re: dyndns problems

Post by hotzenpl0tz »

Hi, unfortunately I still seem to have problems with this. Or maybe it's a limitation. If I manually restart my internet connection with a cronjob at 6 in the morning with: ifdown wan && sleep 6 && ifup wan - it seems as if the ddns script isn't called. I have to do that manually by restarting S90ddns_gargoyle. Is this supposed to be like this or should the service update in this case ?

Eric
Site Admin
Posts: 1443
Joined: Sat Jun 14, 2008 1:14 pm

Re: dyndns problems

Post by Eric »

The service should definitely be updated in this case. It seems like there's still a bug, though I thought I'd fixed this (I distinctly remember testing whether it updated after a network restart). I'll look into this right away.

Eric
Site Admin
Posts: 1443
Joined: Sat Jun 14, 2008 1:14 pm

Re: dyndns problems

Post by Eric »

I just tested again, and it seems to work fine. Last time there was definitely a bug, but as far as I can tell it's fixed now. I only tested with dyndns.org, is that the service you're using or are you using one of the others (e.g. changeip.com, zonedit.com or no-ip.com)?

hotzenpl0tz
Posts: 51
Joined: Thu Dec 18, 2008 1:11 pm

Re: dyndns problems

Post by hotzenpl0tz »

I am using dyndns as well and I am pretty sure username etc. is correct because it does work most of the time and restarting the ddns service manually always lead to a correct update. So for some odd reason it seems the script wasn't getting called. I come to that conclusion because my "fix" was to login to my server behind the router with the actual ip adress, ssh from there into the router and just restart the S90ddns script.

Hm, ok - I just saw that you are essentialy doing the same thing in /etc/ppp/ip-up.d/25-ddns as /etc/rc.d/S90ddns_gargoyle start would do - call your /usr/bin/ddns_gargoyle application. The only difference I can see is that I called "restart" and thus the updater app was killed and restarted. I thought that maybe it was a one time glitch or something, dyndns.org acting up or something similar - but I couldn't reach my server 2 days in a row - and since every night my wan interface was restarted (logs confirmed that that worked) it seems strange that it would have acted up twice in a row. Not sure how I broke your router software again :D

Eric
Site Admin
Posts: 1443
Joined: Sat Jun 14, 2008 1:14 pm

Re: dyndns problems

Post by Eric »

Don't worry, you didn't break it. It's almost certainly my fault for not anticipating whatever is going on. There's a reason Gargoyle is still in beta ;-)

It may be a pppoe issue again. That would explain why we're seeing different things. Right now I have the script in /etc/init.d/ppp/ip-up.d for pppoe and the hotplug script for others. However, it may be that in the latest release everything uses the hotplug script, which now properly handles ppp, and the ip-up.d scripts are deprecated -- I notice that that openwrt packages have moved in this direction.

Try this: delete the /etc/init.d/ppp/ip-up.d/25-ddns script, and then edit /etc/hotplug.d/iface/25-ddns, so that it no longer tests for pppoe (since it isn't being handled in the ppp/ip-up.d script).

Currently the hotplug script looks like this:

Code: Select all

#!/bin/sh

config_load "network"
config_get wan_proto "wan" "proto"

#only start if we're bringing up wan and ppp isn't being used
#if ppp, it's better to use the /etc/ppp/ip-up.d because ip
#changes will trigger this directory to be run while only
#an interface going up or down will trigger this
if [ "$INTERFACE" = "wan" ] && [ "$ACTION" = "ifup" ] && [ "$wan_proto" != 'pppoe' ]
then
	/usr/bin/ddns_gargoyle -P /etc/ddns_providers.conf -C /etc/ddns_gargoyle.conf
fi
change it to this:

Code: Select all

#!/bin/sh

config_load "network"
config_get wan_proto "wan" "proto"


if [ "$INTERFACE" = "wan" ] && [ "$ACTION" = "ifup" ]
then
	/usr/bin/ddns_gargoyle -P /etc/ddns_providers.conf -C /etc/ddns_gargoyle.conf
fi
You can test it by running on the command line:

Code: Select all

ifup wan ; sleep 2 ; ifdown wan
That's the the code you were scheduling cron to run. If it works, the ddns updater should run after a few seconds (after udhcpc is started) and it should print out to the terminal a message that says "[service name] was updated" or "an update of [service name] was not needed" -- that lets you know that it actually checked and is working.

hotzenpl0tz
Posts: 51
Joined: Thu Dec 18, 2008 1:11 pm

Re: dyndns problems

Post by hotzenpl0tz »

Ok, I changed all that and restarted my wan interface and it updated my ip. Although I only know that because dyndns.com told me when the last update happened :) There wasn't a console message or a log entry that logread would show me at least.

I will monitor this now and check dyndns daily to see if it ever stops updating again, and if so try and provide more usefull info. Thanks again !

Post Reply