Errors on DynDNS after ugprade to 2.1
-
I have email notifications turned on on all my pfsense boxes, and after upgrading to 2.1, I have now been getting notifications such as:
X-Cron-Env: <shell= bin="" sh=""> X-Cron-Env: <path= etc:="" bin:="" sbin:="" usr="" sbin=""> X-Cron-Env: <home= var="" log=""> X-Cron-Env: <logname=root> X-Cron-Env: <user=root> route: writing to routing socket: No such process</user=root></logname=root></home=></path=></shell=>
And after checking the logs, I can see that its working normally, apparently, or maybe sometimes it can't extract from checkip.dyndns.org, but either way, it always sends me the above notification:
Oct 13 07:00:00 pfsense php: rc.dyndns.update: DynDns: updatedns() starting Oct 13 07:00:01 pfsense php: rc.dyndns.update: DynDns (xxxx.dyndns.org): 187.162.xxx.xxx extracted from checkip.dyndns.org Oct 13 07:00:01 pfsense php: rc.dyndns.update: DynDNS (xxxx.dyndns.org): running get_failover_interface for wan. found nfe0_vlan100 Oct 13 07:00:01 pfsense php: rc.dyndns.update: DynDns (xxxx.dyndns.org): 187.162.xxx.xxx extracted from checkip.dyndns.org Oct 13 07:00:01 pfsense php: rc.dyndns.update: DynDns (xxxx.dyndns.org): Current WAN IP: 187.162.xxx.xxx Cached IP: 187.162.xxx.xxx Oct 13 07:00:01 pfsense php: rc.dyndns.update: phpDynDNS (xxxx.dyndns.org): No change in my IP address and/or 25 days has not passed. Not updating dynamic DNS entry. Oct 13 07:00:01 pfsense php: sendmail: Message sent to sysop@xxx.xxx OK Oct 14 18:00:00 pfsense php: rc.dyndns.update: DynDns: updatedns() starting Oct 14 18:00:01 pfsense php: rc.dyndns.update: DynDns (xxxx.dyndns.org): 187.162.xxx.xxx extracted from checkip.dyndns.org Oct 14 18:00:01 pfsense php: rc.dyndns.update: DynDNS (xxxx.dyndns.org): running get_failover_interface for wan. found nfe0_vlan100 Oct 14 18:00:01 pfsense php: rc.dyndns.update: DynDns (xxxx.dyndns.org): IP address could not be extracted from checkip.dyndns.org Oct 14 18:00:01 pfsense php: rc.dyndns.update: DynDns (xxxx.dyndns.org): Current WAN IP could not be determined, skipping update process. Oct 14 18:00:01 pfsense php: rc.dyndns.update: phpDynDNS (xxxx.dyndns.org): No change in my IP address and/or 25 days has not passed. Not updating dynamic DNS entry. Oct 14 18:00:03 pfsense php: sendmail: Message sent to sysop@xxx.xxx OK
Even a box that has DynDNS configured but disabled sends me these notices!
I had these systems on a WAN on a Failover Group with 3G modem, and I tried removing the 3G interface so it only has the WAN, but its still sending the route: no such route error. The only other thing I can think of, is that these boxes are all behind a modem that give them a DHCP address in a private subnet, and another box I have that is directly connected to a public address does not send notifications. Any ideas?
Thanks!
-
I made some progress on this, and I think there is a spot that needs improvement in the source of the dyndns script. When the curl function is called, the URL is built with an IP address derived from the hostname of checkip.dyndns.org, instead of actually the name.
Original Line 1226 of dyndns.class:```
$ip_ch = curl_init("http://{$checkip}");Improvement:``` $ip_ch = curl_init("http://{$hosttocheck}");
I understand we could first check to see if the name resolves, but curl should be called with a hostname, not an IP, so that the web server that runs the service can respond to the called service correctly, even if it has virtual hosts or a similar configuration on it. I stumbled upon this because the checkip.dyndns server that was resolving at the time, was not working correctly, and it was replying a generic dyndns page. On noticing this unreliability with the checkip service, I built my checkip service on a web server that runs virtual hosts, thus when curl called with an IP, it would not reply to the checkip service.
Anyway, that doesn't resolve the issue Im having, but I feel its a better way to call curl with hostname rather than IP.
The problem I still haven't been able to resolve, is that I'm still getting "route: writing to routing socket: No such process" notifications. The dyndns update seems to run twice each time (this is not related to the multiple cron bug that was resolved recently), and checkip.dyndns.org does service throttling and does not seem to like more than one request quickly, thus it would sometimes not reply and generate errors. Now with my own checkip service, the script always receives the public IP even if it executes mutliple times and updates fine, even if it does it twice, but still generates the "route: writing to routing socket: No such process" notification…