DynDNS blocked me
-
Hi,
running pfSense 0.96.2 I have problems with my dyndns registration
This is what happens every hour (according to system logs):
Dec 13 16:33:29 php: : phpDynDNS: (Success) No Change In IP Address
Dec 13 16:33:29 php: : DynDns: Current Service: dyndns
Dec 13 16:33:29 php: : DynDns: DynDns _checkStatus() starting.
Dec 13 16:33:28 php: : DynDns: DynDns _update() starting.
Dec 13 16:33:28 php: : DynDns: cacheIP != wan_ip. Updating.
Dec 13 16:33:28 php: : DynDns: Cached IP: 0.0.0.0
Dec 13 16:33:28 php: : DynDns: Current WAN IP: <still same="" ip="">Dec 13 16:33:28 php: : DynDns: _detectChange() starting.
Dec 13 16:33:28 php: : DynDns: updatedns() starting
Dec 13 16:33:28 php: : DynDns: Running updatedns()
Dec 13 16:33:09 php: : Informational: DHClient spawned /etc/rc.newwanip and the new ip is wan - <same ip="" as="" before="">.
Dec 13 16:33:01 dhclient[997]: bound to <my ip="" adres="">– renewal in 1800 seconds.
Dec 13 16:33:01 dhclient[997]: DHCPACK from x.x.x.x
Dec 13 16:33:01 dhclient[997]: DHCPREQUEST on rl0 to x.x.x.x port 67So what happens is that every hour pfSense tries to update my DynDNS records because it thinks it has changed (cached ip: 0.0.0.0!?). Nice consequence is that I get a friendly mail from DynDNS.org saying my account is blocked because of possible abuse!
I have been searching around, but until now haven't found a solution or someone else that has the same problem (searched maillinglist archive, forum, google).
Can anyone help me with this?
Thanks a lot!
MickeyByte</my></same></still> -
run from a shell:
update_file.sh /etc/crontab
shutdown -r now -
OK, done that
so, what did it do? It downloaded a new version of the crontab file from internet.I'm curious, but what was the problem, and how can I be sure that it is ok now? what has changed? ???
If I ask to unblock my account, how can I be sure that it won't be blocked again when I gome home again tomorrow ;-)
Anyway, thanks vor your support!
Mickeybyte -
It updated crontab which is not included in normal updates.
It has fixed everyone else so believe what you want to believe.
-
I don't doubt your solution will work, just want to be sure.
And sorry if I'm asking to much, but what actually was the problem, and what has changed to solve it?
Cause the way I see it, the IP in the cache (0.0.0.0) is wrong! don't see how that is related to the crontab, which only starts programs at scheduled times (and DynDNS does say that it should only update on IP change or once every 28 days (so not hourly, …))Mickeybyte
-
cron was launching the update script every minute…
-
Strange, now I don't believe you anymore :-\
I only saw dyndns updating once an hour in my system logs, so I tought that was to much for dynDNS, now you tell me it was updating every minute?
Then again, I still have the following in my system log:
Dec 13 23:00:38 php: : phpDynDNS: (Unknown Response)
Dec 13 23:00:38 php: : phpDynDNS: PAYLOAD: abuse
Dec 13 23:00:38 php: : DynDns: Current Service: dyndns
Dec 13 23:00:38 php: : DynDns: DynDns _checkStatus() starting.
Dec 13 23:00:37 php: : DynDns: DynDns _update() starting.
Dec 13 23:00:37 php: : DynDns: cacheIP != wan_ip. Updating.
Dec 13 23:00:37 php: : DynDns: Cached IP: 0.0.0.0
Dec 13 23:00:37 php: : DynDns: Current WAN IP: <current ip="">Dec 13 23:00:37 php: : DynDns: _detectChange() starting.
Dec 13 23:00:37 php: : DynDns: updatedns() starting
Dec 13 23:00:37 php: : DynDns: Running updatedns()
Dec 13 23:00:18 dnsmasq[1184]: using nameserver 195.130.131.10#53
Dec 13 23:00:18 dnsmasq[1184]: using nameserver 195.130.130.5#53
Dec 13 23:00:18 dnsmasq[1184]: using nameserver 195.130.131.10#53
Dec 13 23:00:18 dnsmasq[1184]: using nameserver 195.130.130.5#53
Dec 13 23:00:18 dnsmasq[1184]: reading /etc/resolv.conf
Dec 13 23:00:17 php: : Informational: DHClient spawned /etc/rc.newwanip and the new ip is wan - <current ip="">.
Dec 13 23:00:12 dhclient[996]: bound to <current ip="">– renewal in 3600 seconds.
Dec 13 23:00:12 dhclient[996]: DHCPACK from <isp dhcp="">Dec 13 23:00:11 dhclient[996]: DHCPREQUEST on rl0 to <isp dhcp="">port 67
Dec 13 22:28:08 php: : phpDynDNS: (Unknown Response)
Dec 13 22:28:08 php: : phpDynDNS: PAYLOAD: abuse
Dec 13 22:28:08 php: : DynDns: Current Service: dyndns
Dec 13 22:28:08 php: : DynDns: DynDns _checkStatus() starting.
Dec 13 22:28:07 php: : DynDns: DynDns _update() starting.
Dec 13 22:28:07 php: : DynDns: cacheIP != wan_ip. Updating.
Dec 13 22:28:07 php: : DynDns: Cached IP: 0.0.0.0
Dec 13 22:28:07 php: : DynDns: Current WAN IP: <current ip="">Dec 13 22:28:07 php: : DynDns: _detectChange() starting.
Dec 13 22:28:07 php: : DynDns: updatedns() starting
Dec 13 22:28:07 php: : DynDns: Running updatedns()so it always says cached ip: 0.0.0.0 !? therefore it updates dynDNS, although my IP hasn't changed!
I asked to unblock now, but I'm pretty sure that when I come home tomorrow evening, I will again have a mail in my mailbox saying I'm blocked… :'(
Mickeybyte</current></isp></isp></current></current></current>
-
Strange, now I don't believe you anymore :-\
Sorry, once an hour. Either way it was enough to trigger a lockout.
Run this from a shell to make sure you have the latest dyndns client:
update_file.sh /etc/inc/dyndns.class
-
I just got my account deleted from DynDNS :(.
Here's their email:A hostname you had registered with Dynamic Network Services, Inc. (DynDNS), XXXXXXXXX.homeip.net, has been deleted from our systems. This hostname has been deleted a week after the last legitimate update prior to its blocking. Our policies forbid multiple successive updates from the same IP address for performance and resource-conservation purposes; such updates have no function, and use resources which could better serve others. If you are using a hardware router's built-in update functionality, it is most likely not properly functional; we recommend that you contact your router's manufacturer regarding this issue and ask them to contact us for assistance correcting their products to interface properly with our systems.
Now, Scott, I believe you but this is tricky because you had told me in another thread that this had been solved in 0.96.x and I am running 0.96.2.
I see that you posted two commands that we should run.
I'll try them but I don't know if DynDNS is gonna accept back as a registered user :(.
So just to make things clear:
I should runupdate_file.sh /etc/crontab shutdown -r now
wait for the reboot and then I should run```
update_file.sh /etc/inc/dyndns.classShould I expect to see any special response from these commands on the shell prompt? @mickeybyte Scott is actually right. I saw it on my logs. Before it was updating every minute (on 0.95.8 if I recall correctly). And lately (on 0.96.x) it was updating every hour. That's why he says it was updating every minute. Cheers
-
Well for now I'm unblocked since 5h35 this morning (CET) 8), and haven't been blocked until now (3h15 afternoon), so I'll just wait for another day to see if it has been solved by those 2 updates.
BTW, unblocking apparently goes very easy, since it is the second time it happened to me in only 2 days and after a few hours my account was unblocked.
-
Well for now I'm unblocked since 5h35 this morning (CET) 8), and haven't been blocked until now (3h15 afternoon)…
Howcome? Here it's still 3h05pm :D.
Anyway I had already been blocked before because of this issue.
This time I was deleted!
Let's see how easy it will be to bring that account back alive.
Though, many thanks for your positive feedback ;).@Scott
Sorry but I suck at *BSD/Linux.
Those commands you posted how shall I run them?
I was trying to do a "cd /etc/crontab" from the Diagnostics > Command Prompt.
It seems to accept it but then I do a "pwd" just to find out that I'm still stuck at "/usr/local/www".
How can I change directories from the command prompt to run those commands you posted?
TIA
Cheers -
Hi,
better activate ssh and use a ssh session to do it.
You can however run the commands in the exec.php window, one at a time, but a "cd" won't work, because each time you are indeed again in the default directory
MickeyByte
-
Thanks mickeybyte ;)
CheersEDIT: I have successfuly sshed to my box.
I am currently in "/etc" and I can see the file "crontab".
But now what do I do?
What did Scott mean by "update_file.sh"?
TIA -
you actually don't need to "cd" to that dir
in fact, you only need to enter the commands like Scott said
so at your shell prompt you type:update_file.sh /etc/crontab <enter>==> updates the crontab file
update_file.sh /etc/inc/dyndns.class <enter>==> updates the dyndns.class procedure
shutdown -r now <enter>==> reboots the firewallI think you might as well update the dyndns.class file also before rebooting
So you could have just entered those commands one at a time in the command box using the webinterface (in stead of <enter>you click <submit>)</submit></enter></enter></enter></enter>
-
Thanks mickeybyte ;).
BTW how is that dyndns service behaving so far?
CheersEDIT:
# update_file.sh /etc/crontab trying to fetch latest /etc/crontab fetch: http://pfsense.com/cgi-bin/cvsweb.cgi/pfSense/etc/crontab?rev=1;content-type=text%2Fplain: size of remote file is not known /etc/crontab 465 B 110 kBps # update_file.sh /etc/inc/dyndns.class trying to fetch latest /etc/inc/dyndns.class fetch: http://pfsense.com/cgi-bin/cvsweb.cgi/pfSense/etc/inc/dyndns.class?rev=1;content-type=text%2Fplain: size of remote file is not known /etc/inc/dyndns.class 20 kB 44 kBps
This is what I got.
Is this ok?
Cheers -
until now still running fine (fine = not being blocked)
however in the logs it still says every hour cache ip (0.0.0.0) != wan ip (current ip) although it did not change!
Strange I think, because I used to have m0n0wall and I had never any problems with that system.
Nevertheless, I'll keep you informed if my DynDNS account status changes! ;)
-
#1. There was a bug where the cache was being updated every time. Now the cache will not be updated unless it has received a OK status from the provider. So that means your cache statement will be updated as soon as you're ip changes.
#2. We do not use any of the same code for DYNDNS. Erik rewrote ez-ipupdate (which is no longer maintained) to be complete php.
-
Great :)
And thanks for support!
-
Thanks for clarifying this for us Scott.
Cheers -
btw, that also is the reason why the dyndns providerlist of m0n0 and pfsense is different.
-
oops :-[, never saw the difference…
-
Well, it did last a day longer than before, but there it was again in my mailbox today:
–---Original Message-----
From: DynDNS Support [mailto:support@dyndns.com]
Sent: Thursday, December 15, 2005 3:31 AM
To: <my email="">Subject: Hostname Blocked Due To AbuseDear Valued Customer:
The hostname, myaccount.homedns.org, in account myaccount, has been blocked for
abuse. This action has been taken due to the receipt of multiple updates
originating from the same IP address.Please note, updates which result in the IP address associated with a host
changing are NOT considered abusive. Only those updates which result in no
change to the host are abusive. Please take a moment to review our Update
Abuse Policy here:http://www.dyndns.com/support/abuse.html
:'(</my>
-
Show us your system logs.
Also show us /etc/crontab
-
/etc/crontab:
$ less /etc/crontab
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
HOME=/var/log
#minute hour mday month wday who command
0 * * * * root /usr/bin/nice -n20 newsyslog
1,31 0-5 * * * root /usr/bin/nice -n20 adjkerntz -a
1 * 1 * * root /usr/bin/nice -n20 /etc/rc.update_bogons.sh
*/60 * * * * root /usr/bin/nice -n20 /usr/local/sbin/expiretable -v -t 3600 sshlockout
1 0-1 * * * root /usr/bin/nice -n20 /etc/rc.dyndns.updateSystemlogs are more difficult, unless you can tell me where I can find them on pfSense (not the webinterface, but the files itself)? Problem is I sent all syslogs tot a syslog daemon, but last night my switch gave up, and I've just repaired the problem, so I don't have any logs in my syslog daemon since late last night. I'll see if I can already find something in there.
-
From a shell:
cat /var/log/system.log | grep Dyn
-
looking at the crontab, I've noticed the dyndns line stating
1 0-1 * * * …
what exactly does it mean? when does it run.I'can only find logfiles on the firewall since I've rebooted it a few hours ago, and there I noticed it updated it every 10 seconds?
In my syslog daemon, I can only find logs until 12 o'clock last night and there it shows up every once an hour, but still not blocked.
The mail that said I was blocked again came around 3h30 this morning -
The first 1 is first minute. I thought 0-1 is a randomized midnight to 1 am.
I'll change it to run at 1:01 am
Run update_file.sh /etc/crontab again
-
Scott,
If you ask me, that's not the best solution.
say, my Ip changes at 4am, it will take until next day 1h01, until my dyndns will get updated? or am I getting it wrong here?Still can't resist to bring up the CachedIP problem again. That's where the problem is according to me, if it can correctly compare cachedIP and current IP, and only contact dyndns if that's different, what actually does at this time, but cachedIP is always 0.0.0.0.
I'll take a look at the dyndns.class file to see if I can find anything there (not that I'm a freebsd geek, but I do have some programming skills and some linux knowledge)
-
Scott,
If you ask me, that's not the best solution.
say, my Ip changes at 4am, it will take until next day 1h01, until my dyndns will get updated? or am I getting it wrong here?Still can't resist to bring up the CachedIP problem again. That's where the problem is according to me, if it can correctly compare cachedIP and current IP, and only contact dyndns if that's different, what actually does at this time, but cachedIP is always 0.0.0.0.
I'll take a look at the dyndns.class file to see if I can find anything there (not that I'm a freebsd geek, but I do have some programming skills and some linux knowledge)
The dynamic dns client is run after ANY ip change. The only reason for the once a day check is to check back in after 28 days to keep the item from expiring.
-
This is what I found in /var/etc/dyndns.debug:
12-11-05 09:14:42 - (6919068) - [dyndns] - 0.0.0.0/1134330236
12-11-05 10:14:42 - (5357457) - [dyndns] - 0.0.0.0/1134330236
12-11-05 11:14:43 - (2891556) - [dyndns] - 0.0.0.0/1134330236
12-12-05 12:14:42 - (4651791) - [dyndns] - 0.0.0.0/1134330236
12-12-05 01:01:02 - (2923375) - [dyndns] - 0.0.0.0/1134330236
12-12-05 01:14:42 - (4669015) - [dyndns] - 0.0.0.0/1134330236
12-12-05 02:01:02 - (7177439) - [dyndns] - 0.0.0.0/1134330236
12-12-05 02:14:42 - (3299583) - [dyndns] - 0.0.0.0/1134330236
12-12-05 03:14:41 - (4731010) - [dyndns] - 0.0.0.0/1134330236
12-12-05 04:14:45 - (8340914) - [dyndns] - 0.0.0.0/1134330236
12-12-05 05:14:44 - (3307104) - [dyndns] - 0.0.0.0/1134330236
12-12-05 06:14:45 - (9571554) - [dyndns] - 0.0.0.0/1134330236
12-12-05 06:44:44 - (5194273) - [dyndns] - 0.0.0.0/1134330236
12-12-05 07:44:43 - (5387404) - [dyndns] - 0.0.0.0/1134330236
12-12-05 08:44:43 - (5649611) - [dyndns] - 0.0.0.0/1134330236
12-12-05 09:44:42 - (6107681) - [dyndns] - 0.0.0.0/1134330236
12-12-05 10:44:48 - (7788679) - [dyndns] - 0.0.0.0/1134330236
12-12-05 11:44:47 - (4119622) - [dyndns] - 0.0.0.0/1134330236
12-12-05 12:44:47 - (4233917) - [dyndns] - 0.0.0.0/1134330236
12-12-05 01:44:47 - (7404288) - [dyndns] - 0.0.0.0/1134330236
12-12-05 02:44:47 - (6548574) - [dyndns] - 0.0.0.0/1134330236
12-12-05 03:44:47 - (5386367) - [dyndns] - 0.0.0.0/1134330236
12-12-05 04:44:47 - (8115236) - [dyndns] - 0.0.0.0/1134330236
12-12-05 04:44:48 - (8115236) - [dyndns] - abuse
12-12-05 05:44:46 - (9107850) - [dyndns] - 0.0.0.0/1134330236
12-12-05 05:44:47 - (9107850) - [dyndns] - abuse
12-12-05 06:44:46 - (6465648) - [dyndns] - 0.0.0.0/1134330236
12-12-05 06:44:47 - (6465648) - [dyndns] - abuse
12-12-05 07:44:51 - (4552343) - [dyndns] - 0.0.0.0/1134330236
12-12-05 07:44:52 - (4552343) - [dyndns] - abuse
12-12-05 08:44:51 - (4040148) - [dyndns] - 0.0.0.0/1134330236
12-12-05 08:44:52 - (4040148) - [dyndns] - abuse
12-12-05 09:44:51 - (4279538) - [dyndns] - 0.0.0.0/1134330236
12-12-05 09:44:52 - (4279538) - [dyndns] - abuse
12-12-05 10:21:09 - (5411452) - [dyndns] - 0.0.0.0/1134330236
12-12-05 10:21:10 - (5411452) - [dyndns] - abuse
12-12-05 10:21:31 - (3706664) - [dyndns] - 0.0.0.0/1134330236
12-12-05 10:21:34 - (3706664) - [dyndns] - abuse
12-12-05 10:21:34 - (8356999) - [dyndns] - 0.0.0.0/1134330236
12-12-05 10:21:36 - (8356999) - [dyndns] - abuse
12-12-05 10:22:13 - (3049021) - [dyndns] - 0.0.0.0/1134330236
12-12-05 10:22:13 - (3049021) - [dyndns] - abuse
12-12-05 10:22:23 - (1328388) - [dyndns] - 0.0.0.0/1134330236
12-12-05 10:22:24 - (1328388) - [dyndns] - abuse
12-12-05 11:03:22 - (1159591) - [dyndns] - 0.0.0.0/1134330236
12-13-05 12:01:02 - (3816026) - [dyndns] - 0.0.0.0/1134330236
12-13-05 12:03:23 - (9821675) - [dyndns] - 0.0.0.0/1134330236
12-13-05 12:33:22 - (6804676) - [dyndns] - 0.0.0.0/1134330236
12-13-05 01:01:02 - (2003913) - [dyndns] - 0.0.0.0/1134330236
12-13-05 01:33:22 - (8397757) - [dyndns] - 0.0.0.0/1134330236
12-13-05 02:33:21 - (1765254) - [dyndns] - 0.0.0.0/1134330236
12-13-05 03:33:22 - (2963531) - [dyndns] - 0.0.0.0/1134330236
12-13-05 04:33:26 - (9327919) - [dyndns] - 0.0.0.0/1134330236
12-13-05 05:33:26 - (5784744) - [dyndns] - 0.0.0.0/1134330236
12-13-05 06:33:25 - (2334690) - [dyndns] - 0.0.0.0/1134330236
12-13-05 07:33:24 - (1719783) - [dyndns] - 0.0.0.0/1134330236
12-13-05 08:33:25 - (7267097) - [dyndns] - 0.0.0.0/1134330236
12-13-05 09:03:24 - (1136798) - [dyndns] - 0.0.0.0/1134330236
12-13-05 10:03:26 - (8225073) - [dyndns] - 0.0.0.0/1134330236
12-13-05 11:03:26 - (9846324) - [dyndns] - 0.0.0.0/1134330236
12-13-05 12:03:25 - (7372019) - [dyndns] - 0.0.0.0/1134330236
12-13-05 12:33:24 - (7141727) - [dyndns] - 0.0.0.0/1134330236
12-13-05 01:33:29 - (5183041) - [dyndns] - 0.0.0.0/1134330236
12-13-05 02:33:29 - (5446201) - [dyndns] - 0.0.0.0/1134330236
12-13-05 03:33:28 - (4943944) - [dyndns] - 0.0.0.0/1134330236
12-13-05 04:33:28 - (9974256) - [dyndns] - 0.0.0.0/1134330236
12-13-05 05:03:28 - (3564105) - [dyndns] - 0.0.0.0/1134330236
12-13-05 06:03:27 - (5400248) - [dyndns] - 0.0.0.0/1134330236
12-13-05 07:03:27 - (7203522) - [dyndns] - 0.0.0.0/1134330236
12-13-05 08:03:28 - (7083926) - [dyndns] - 0.0.0.0/1134330236
12-13-05 08:03:29 - (7083926) - [dyndns] - abuse
12-13-05 08:33:33 - (8607025) - [dyndns] - 0.0.0.0/1134330236
12-13-05 08:33:37 - (8607025) - [dyndns] - abuse
12-13-05 09:33:32 - (3387273) - [dyndns] - 0.0.0.0/1134330236
12-13-05 09:33:33 - (3387273) - [dyndns] - abuse
12-13-05 10:27:00 - (7111110) - [dyndns] - 0.0.0.0/1134330236
12-13-05 10:27:02 - (7111110) - [dyndns] - abuse
12-13-05 10:27:26 - (3591037) - [dyndns] - 0.0.0.0/1134330236
12-13-05 10:27:26 - (3591037) - [dyndns] - abuse
12-13-05 10:27:29 - (4293309) - [dyndns] - 0.0.0.0/1134330236
12-13-05 10:27:32 - (4293309) - [dyndns] - abuse
12-13-05 10:28:07 - (7443118) - [dyndns] - 0.0.0.0/1134330236
12-13-05 10:28:08 - (7443118) - [dyndns] - abuse
12-13-05 11:00:37 - (9708846) - [dyndns] - 0.0.0.0/1134330236
12-13-05 11:00:38 - (9708846) - [dyndns] - abuse
12-14-05 12:00:36 - (9085216) - [dyndns] - 0.0.0.0/1134330236
12-14-05 12:00:37 - (9085216) - [dyndns] - abuse
12-14-05 12:01:02 - (8895196) - [dyndns] - 0.0.0.0/1134330236
12-14-05 12:01:03 - (8895196) - [dyndns] - abuse
12-14-05 01:00:36 - (7739452) - [dyndns] - 0.0.0.0/1134330236
12-14-05 01:00:37 - (7739452) - [dyndns] - abuse
12-14-05 01:01:03 - (5872394) - [dyndns] - 0.0.0.0/1134330236
12-14-05 01:01:03 - (5872394) - [dyndns] - abuse
12-14-05 02:00:40 - (4460649) - [dyndns] - 0.0.0.0/1134330236
12-14-05 02:00:42 - (4460649) - [dyndns] - abuse
12-14-05 03:00:40 - (8074266) - [dyndns] - 0.0.0.0/1134330236
12-14-05 03:00:41 - (8074266) - [dyndns] - abuse
12-14-05 03:30:41 - (7841892) - [dyndns] - 0.0.0.0/1134330236
12-14-05 03:30:42 - (7841892) - [dyndns] - abuse
12-14-05 04:30:40 - (5952109) - [dyndns] - 0.0.0.0/1134330236
12-14-05 04:30:41 - (5952109) - [dyndns] - abuse
12-14-05 05:30:40 - (7029667) - [dyndns] - 0.0.0.0/1134330236
12-14-05 05:30:41 - (7029667) - [dyndns] - abuse
12-14-05 06:00:39 - (2398307) - [dyndns] - 0.0.0.0/1134330236
12-14-05 07:00:40 - (3043041) - [dyndns] - 0.0.0.0/1134330236
12-14-05 08:00:39 - (5506055) - [dyndns] - 0.0.0.0/1134330236
12-14-05 09:00:40 - (3014221) - [dyndns] - 0.0.0.0/1134330236
12-14-05 10:00:37 - (1297223) - [dyndns] - 0.0.0.0/1134330236
12-14-05 11:00:42 - (5587871) - [dyndns] - 0.0.0.0/1134330236
12-14-05 12:00:42 - (7815354) - [dyndns] - 0.0.0.0/1134330236
12-14-05 01:00:41 - (8702000) - [dyndns] - 0.0.0.0/1134330236
12-14-05 02:00:41 - (6367796) - [dyndns] - 0.0.0.0/1134330236
12-14-05 03:00:41 - (8783922) - [dyndns] - 0.0.0.0/1134330236
12-14-05 03:30:41 - (9664607) - [dyndns] - 0.0.0.0/1134330236
12-14-05 04:30:40 - (6759643) - [dyndns] - 0.0.0.0/1134330236
12-14-05 05:30:40 - (7330136) - [dyndns] - 0.0.0.0/1134330236
12-14-05 06:30:46 - (8976396) - [dyndns] - 0.0.0.0/1134330236
12-14-05 07:30:46 - (6721446) - [dyndns] - 0.0.0.0/1134330236
12-14-05 08:30:46 - (3731522) - [dyndns] - 0.0.0.0/1134330236
12-14-05 09:30:51 - (8441664) - [dyndns] - 0.0.0.0/1134330236
12-14-05 10:30:36 - (2122589) - [dyndns] - 0.0.0.0/1134330236
12-14-05 11:30:35 - (7019757) - [dyndns] - 0.0.0.0/1134330236
12-15-05 12:01:03 - (2048596) - [dyndns] - 0.0.0.0/1134330236
12-15-05 12:30:36 - (9360039) - [dyndns] - 0.0.0.0/1134330236
12-15-05 01:01:03 - (6270883) - [dyndns] - 0.0.0.0/1134330236
12-15-05 01:30:35 - (9418419) - [dyndns] - 0.0.0.0/1134330236
12-15-05 02:30:34 - (6853193) - [dyndns] - 0.0.0.0/1134330236
12-15-05 03:30:37 - (8088756) - [dyndns] - 0.0.0.0/1134330236
12-15-05 04:30:38 - (1488027) - [dyndns] - 0.0.0.0/1134330236
12-15-05 04:30:39 - (1488027) - [dyndns] - abuse
12-15-05 05:30:37 - (1156730) - [dyndns] - 0.0.0.0/1134330236
12-15-05 05:30:38 - (1156730) - [dyndns] - abuse
12-15-05 06:30:35 - (1208572) - [dyndns] - 0.0.0.0/1134330236
12-15-05 06:30:36 - (1208572) - [dyndns] - abuse
12-15-05 07:30:39 - (8267492) - [dyndns] - 0.0.0.0/1134330236
12-15-05 07:30:40 - (8267492) - [dyndns] - abuse
12-15-05 08:30:38 - (7514137) - [dyndns] - 0.0.0.0/1134330236
12-15-05 08:30:41 - (7514137) - [dyndns] - abuse
12-15-05 09:30:39 - (5583750) - [dyndns] - 0.0.0.0/1134330236
12-15-05 09:30:40 - (5583750) - [dyndns] - abuse
12-15-05 10:30:38 - (7945971) - [dyndns] - 0.0.0.0/1134330236
12-15-05 10:30:38 - (7945971) - [dyndns] - abuse
12-15-05 11:30:36 - (2149134) - [dyndns] - 0.0.0.0/1134330236
12-15-05 11:30:37 - (2149134) - [dyndns] - abuse
12-15-05 12:30:40 - (6524642) - [dyndns] - 0.0.0.0/1134330236
12-15-05 12:30:41 - (6524642) - [dyndns] - abuse
12-15-05 01:30:39 - (7896830) - [dyndns] - 0.0.0.0/1134330236
12-15-05 01:30:40 - (7896830) - [dyndns] - abuse
12-15-05 02:30:38 - (3340408) - [dyndns] - 0.0.0.0/1134330236
12-15-05 02:30:39 - (3340408) - [dyndns] - abuse
12-15-05 03:30:42 - (7449804) - [dyndns] - 0.0.0.0/1134330236
12-15-05 03:30:43 - (7449804) - [dyndns] - abuse
12-15-05 04:30:46 - (6812999) - [dyndns] - 0.0.0.0/1134330236
12-15-05 04:30:47 - (6812999) - [dyndns] - abuse
12-15-05 05:30:45 - (9706623) - [dyndns] - 0.0.0.0/1134330236
12-15-05 05:30:46 - (9706623) - [dyndns] - abuse
12-15-05 06:08:25 - (3152146) - [dyndns] - 0.0.0.0/1134330236
12-15-05 06:08:27 - (3152146) - [dyndns] - abuse
12-15-05 06:08:29 - (6411514) - [dyndns] - 0.0.0.0/1134330236
12-15-05 06:08:40 - (6411514) - [dyndns] - abuse
12-15-05 06:08:43 - (6894303) - [dyndns] - 0.0.0.0/1134330236
12-15-05 06:08:44 - (6894303) - [dyndns] - abuse
12-15-05 06:09:01 - (3310163) - [dyndns] - 0.0.0.0/1134330236
12-15-05 06:09:01 - (3310163) - [dyndns] - abuse
12-15-05 06:23:29 - (2898009) - [dyndns] - 0.0.0.0/1134330236
12-15-05 06:23:31 - (2898009) - [dyndns] - abuse
12-15-05 06:24:18 - (1482317) - [dyndns] - 0.0.0.0/1134330236
12-15-05 06:24:21 - (1482317) - [dyndns] - abuse
12-15-05 06:40:59 - (8417336) - [dyndns] - 0.0.0.0/1134330236
12-15-05 06:41:00 - (8417336) - [dyndns] - abuse
12-15-05 06:41:31 - (7819280) - [dyndns] - 0.0.0.0/1134330236
12-15-05 06:41:32 - (7819280) - [dyndns] - abuse
12-15-05 06:48:29 - (3020094) - [dyndns] - 0.0.0.0/1134330236
12-15-05 06:48:29 - (3020094) - [dyndns] -
12-15-05 06:48:40 - (4232711) - [dyndns] - 0.0.0.0/1134330236
12-15-05 06:48:40 - (4232711) - [dyndns] -
12-15-05 06:48:51 - (1028691) - [dyndns] - 0.0.0.0/1134330236
12-15-05 06:48:51 - (1028691) - [dyndns] -
12-15-05 06:49:03 - (7385844) - [dyndns] - 0.0.0.0/1134330236
12-15-05 06:49:03 - (7385844) - [dyndns] -
12-15-05 07:45:05 - (2353015) - [dyndns] - 0.0.0.0/1134330236
12-15-05 07:45:06 - (2353015) - [dyndns] -
12-15-05 07:50:22 - (2752449) - [dyndns] - 0.0.0.0/1134330236
12-15-05 07:50:24 - (2752449) - [dyndns] - abuse
12-15-05 07:50:26 - (6615088) - [dyndns] - 0.0.0.0/1134330236
12-15-05 07:50:26 - (6615088) - [dyndns] - abuse
12-15-05 07:50:46 - (3027218) - [dyndns] - 0.0.0.0/1134330236
12-15-05 07:50:47 - (3027218) - [dyndns] - abuse
12-15-05 07:50:56 - (5291978) - [dyndns] - 0.0.0.0/1134330236
12-15-05 07:50:56 - (5291978) - [dyndns] - abuseseems like it is updatin every hour, of half an our. This could be related to my DHCP renewal time. Sometimes it's 1800 seconds, other times it's 3600 seconds.
however, I seem to always get the same IP address on every renewal.I'll look further into the script.
-
You're cache file still reads 0.0.0.0?
Did it ever succeed?
-
nope, cachedIP is always 0.0.0.0, so when it compares wanip with cacheIP, it's always different
-
That's wild. Try unblocking yourself and watching the first run of the dyndns client, if the provider gives a ok message it should update the cache file.
-
Let's look at the function DetectChange:
function _detectChange() {log_error("DynDns: _detectChange() starting.");
$currentTime = time();
$wan_ip = get_current_wan_address();
$this->_dnsIP = $wan_ip;
log_error("DynDns: Current WAN IP: {$wan_ip}");if (file_exists($this->_cacheFile)) {
if(file_exists($this->_cacheFile))
$contents = file_get_contents($this->_cacheFile);
else
$contents = "";
list($cacheIP,$cacheTime) = split(':', $contents);
$this->_debug($cacheIP.'/'.$cacheTime);
$initial = false;
log_error("DynDns: Cached IP: {$cacheIP}");
} else {
conf_mount_rw();
$file = fopen($this->_cacheFile, 'w');
fwrite($file, '0.0.0.0:'.$currentTime);
fclose($file);
conf_mount_ro();
$cacheIP = '0.0.0.0';
$cacheTime = $currentTime;
$initial = true;
log_error("DynDns: No Cached IP found.");
}/* use 2419200 for dyndns, dhs, easydns, noip, hn
* zoneedit, dyns, ods
*/
$time = '2419200';$needs_updating = FALSE;
/* lets deterimine if the item needs updating /
if ($cacheIP != $wan_ip) {
$needs_updating = TRUE;
log_error("DynDns: cacheIP != wan_ip. Updating.");
}
$update_reason = "Cached IP: {$cacheIP} WAN IP: {$wan_ip} ";
if (($currentTime - $cacheTime) > $time ) {
$needs_updating = TRUE;
log_error("DynDns: More than 28 days. Updating.");
}
$update_reason .= "{$currentTime} - {$cacheTime} > {$time} ";
if ($initial == TRUE) {
$needs_updating = TRUE;
$update_reason .= "Inital update. ";
log_error("DynDns: Initial run. Updating.");
}
/ finally if we need updating then store the
* new cache value and return true
*/
if($needs_updating == TRUE) {
return TRUE;
} else {
return FALSE;
}log_error("DynDns debug information: {$update_reason}");
}
especially the last part here
in comments, it says:
/* finally if we need updating then store the
* new cache value and return true
*/
if($needs_updating == TRUE) {
return TRUE;
} else {
return FALSE;
}but I don't see anywhere in the script some code that realy updates the cache file?
-
Look further up:
if ($this->_detectChange() == FALSE) {
$this->_error(10);
} else {
if ($this->_dnsService == 'dyndns' ||
$this->_dnsService == 'dyndns-static' ||
$this->_dnsService == 'dyndns-custom' ||
$this->_dnsService == 'dhs' ||
$this->_dnsService == 'noip' ||
$this->_dnsService == 'easydns' ||
$this->_dnsService == 'hn' ||
$this->_dnsService == 'zoneedit' ||
$this->_dnsService == 'dyns' ||
$this->_dnsService == 'ods')
{
$this->_update();
} else {
$this->_error(6);
}
} -
Sorry,
there is in function CheckStatus at the end:
if($successful_update == true) {
/* Write WAN IP to cache file */
conf_mount_rw();
$file = fopen($this->_cacheFile, 'w');
fwrite($file, $wan_ip.':'.$currentTime);
fclose($file);
conf_mount_ro();
}but it doesn't seem to do it I guess.
-
I have reports from many people that it does work, so I am at a loss.
-
Scott,
I've changed the Cachefile to update it with my current IP. then reactivated the dyndns service, and this is what I get in logs:
Dec 15 23:40:50 php: /services_dyndns.php: phpDynDNS: No Change In My IP Address and/or 28 Days Has Not Past. Not Updating Dynamic DNS Entry.
Dec 15 23:40:50 php: /services_dyndns.php: DynDns: Cached IP: <cache ip="">Dec 15 23:40:50 php: /services_dyndns.php: DynDns: Current WAN IP: <current ip="">Dec 15 23:40:50 php: /services_dyndns.php: DynDns: _detectChange() starting.
Dec 15 23:40:50 php: /services_dyndns.php: DynDns: updatedns() starting
Dec 15 23:40:50 php: /services_dyndns.php: DynDns: Running updatedns()So that part is working!
Still have no clue why the cache file didn't get updated, so'll do some testing now, trying to get my wan ip changed, or to manually change cache file to something else and see what it does</current></cache> -
update_file.sh /etc/inc/dyndns.class
I've added a logging portion to log when the cache file is updated.
-
OK, this is what happened:
I've created a new dyndns dynamic host, to do the test, cause it takes some hours to unblock oneI've added in the cache file 192.168.1.1
I've release and renewed my WAN ip to trigger the dyndns service:
in logs:
Dec 15 23:56:02 php: /services_dyndns.php: phpDynDNS: (Success) IP Address Changed Successfully! (<my wan="" ip="">)
Dec 15 23:56:02 php: /services_dyndns.php: phpDynDNS: updating cache file /cf/conf/dyndns.cache:
Dec 15 23:56:02 php: /services_dyndns.php: DynDns: Current Service: dyndns
Dec 15 23:56:02 php: /services_dyndns.php: DynDns: DynDns _checkStatus() starting.
Dec 15 23:56:01 php: /services_dyndns.php: DynDns: DynDns _update() starting.
Dec 15 23:56:01 php: /services_dyndns.php: DynDns: cacheIP != wan_ip. Updating.
Dec 15 23:56:01 php: /services_dyndns.php: DynDns: Cached IP: 192.168.1.1
Dec 15 23:56:01 php: /services_dyndns.php: DynDns: Current WAN IP: <my wan="" ip="">Dec 15 23:56:01 php: /services_dyndns.php: DynDns: _detectChange() starting.
Dec 15 23:56:01 php: /services_dyndns.php: DynDns: updatedns() starting
Dec 15 23:56:01 php: /services_dyndns.php: DynDns: Running updatedns()When I check Dyndns website, my account is updated with the new address (I've put 192.168.1.1 in it when creating, now it shows me my current WAN IP )
I check the cache file on pfSense, and what do I see? only ":" (without the quotes), so there's no IP or timestamp in it?
I do again a release and renew of WAN interface:
Dec 15 23:57:20 php: : phpDynDNS: (Success) No Change In IP Address
Dec 15 23:57:20 php: : DynDns: Current Service: dyndns
Dec 15 23:57:20 php: : DynDns: DynDns _checkStatus() starting.
Dec 15 23:57:18 php: : DynDns: DynDns _update() starting.
Dec 15 23:57:18 php: : DynDns: More than 28 days. Updating.
Dec 15 23:57:18 php: : DynDns: cacheIP != wan_ip. Updating.
Dec 15 23:57:18 php: : DynDns: Cached IP:
Dec 15 23:57:18 php: : DynDns: Current WAN IP: <my wan="" ip="">Dec 15 23:57:18 php: : DynDns: _detectChange() starting.
Dec 15 23:57:18 php: : DynDns: updatedns() starting
Dec 15 23:57:18 php: : DynDns: Running updatedns()in the logs it also says me now the cache is empty, so not even 0.0.0.0 any more!?
I also see in the first successful update, the extra logging you added. But should there also not be the ip you put in the cache?</my></my></my>