Problems with DynDNS



  • Hello,

    I have Problems with DynDNS in 2.0-RC1 (i386)built on Mon Mar 7 12:03:17 EST 2011.

    Description:
    If the public ip changed the "Cached IP" will switched to color red, but then i get no DynDns update.
    If i edit DynDNS settings. It will be updated.

    When does the DynDNS update will be process? Is there a cron job or is it trigger on ip Change?

    The pfsense router is behind another router.

    Thanks



  • There is a cron job to check the interface IP and it is set to run about 1AM (from memory). That is, its polled once a day.



  • IT should trigger even every time your ip changes.
    So please post the system log here.



  • On my system:

    more /etc/crontab

    SHELL=/bin/sh
    PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
    HOME=/var/log
    #minute hour    mday    month   wday    who      command

    pfSense specific crontab entries

    Created: March 8, 2011, 11:11 pm

    0       *       *       *       *       root    /usr/bin/nice -n20 newsyslog
    1,31    0-5     *       *       *       root    /usr/bin/nice -n20 adjkerntz -a
    1       3       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       1       *       *       *       root    /usr/bin/nice -n20 /etc/rc.dyndns.update
    */60    *       *       *       *       root    /usr/bin/nice -n20 /usr/local/sbin/expiretable -v -t 3600 virusprot
    */60    *       *       *       *       root    /usr/bin/nice -n20 /usr/local/sbin/expiretable -t 1800 snort2c
    */5     *       *       *       *       root    /usr/local/pkg/Fit123/ddns/DDNS.sh
    30      12      *       *       *       root    /usr/bin/nice -n20 /etc/rc.update_urltables

    If possible do not add items to this file manually.

    If you do so, this file must be terminated with a blank line (e.g. new line)

    So /etc/rc.dyndns.update runs daily at 1:01. There may be some other mechanism for checking the WAN IP and doing a DNS update but it doesn't seem to be invoked on my system.



  • Ok at the cron Job it will work fine.

    Mar 9 01:01:01 php: : DynDns: Running updatedns()
    Mar 9 01:01:01 php: : DynDns: updatedns() starting
    Mar 9 01:01:01 php: : DynDns: _detectChange() starting.
    Mar 9 01:01:01 php: : DynDns: _checkIP() starting.
    Mar 9 01:01:01 php: : DynDns debug information: XX.XXX.124.186 extracted from checkip.dyndns.org
    Mar 9 01:01:01 php: : DynDns: Current WAN IP: XXX.XXX.124.186
    Mar 9 01:01:01 php: : DynDns: Cached IP: XXX.XXX.106.245
    Mar 9 01:01:01 php: : DynDns debug information: DynDns: cacheIP != wan_ip. Updating. Cached IP: XXX.XXX.106.245 WAN IP: XXX.XXX.124.186
    Mar 9 01:01:01 php: : DynDns: DynDns _update() starting.
    Mar 9 01:01:02 php: : DynDns: DynDns _checkStatus() starting.
    Mar 9 01:01:02 php: : DynDns: Current Service: dyndns
    Mar 9 01:01:02 php: : DynDns: _checkIP() starting.
    Mar 9 01:01:02 php: : DynDns debug information: XXX.XXX.124.186 extracted from checkip.dyndns.org
    Mar 9 01:01:02 php: : phpDynDNS: updating cache file /conf/dyndns_wandyndns'hellweghaus1.dyndns.org'.cache: 79.224.124.186
    Mar 9 01:01:02 php: : phpDynDNS: (Success) IP Address Changed Successfully! (79.224.124.186)

    The Ip has Changed to XXX.XXX.127.106
    The CachedIP shows 79.224.124.186 in red color.

    Now i press the edit button and save settings.
    the Ip has Changed to XXX.XXX.127.106 and update dynDNS

    Mar 9 01:20:05 php: /services_dyndns_edit.php: DynDns: Running updatedns()
    Mar 9 01:20:05 php: /services_dyndns_edit.php: DynDns: updatedns() starting
    Mar 9 01:20:05 php: /services_dyndns_edit.php: DynDns: _detectChange() starting.
    Mar 9 01:20:05 php: /services_dyndns_edit.php: DynDns: _checkIP() starting.
    Mar 9 01:20:05 php: /services_dyndns_edit.php: DynDns debug information: XXX.XXX.127.106 extracted from checkip.dyndns.org
    Mar 9 01:20:05 php: /services_dyndns_edit.php: DynDns: Current WAN IP: XXX.XXX.127.106
    Mar 9 01:20:05 php: /services_dyndns_edit.php: DynDns: Cached IP: XXX.XXX.124.186
    Mar 9 01:20:05 php: /services_dyndns_edit.php: DynDns debug information: DynDns: cacheIP != wan_ip. Updating. Cached IP: XXX.XXX.124.186 WAN IP: XXX.XXX.127.106
    Mar 9 01:20:05 php: /services_dyndns_edit.php: DynDns: DynDns _update() starting.
    Mar 9 01:20:06 php: /services_dyndns_edit.php: DynDns: DynDns _checkStatus() starting.
    Mar 9 01:20:06 php: /services_dyndns_edit.php: DynDns: Current Service: dyndns
    Mar 9 01:20:06 php: /services_dyndns_edit.php: DynDns: _checkIP() starting.
    Mar 9 01:20:06 php: /services_dyndns_edit.php: DynDns debug information: XXX.XXX.127.106 extracted from checkip.dyndns.org
    Mar 9 01:20:06 php: /services_dyndns_edit.php: phpDynDNS: updating cache file /conf/dyndns_wandyndns'hellweghaus1.dyndns.org'.cache: XXX.XXX.127.106
    Mar 9 01:20:06 php: /services_dyndns_edit.php: phpDynDNS: (Success) IP Address Changed Successfully! (XXX.XXX.127.106)

    Do you need more infos?



  • is this a bug or wrong use?



  • @ermal:

    IT should trigger even every time your ip changes.
    So please post the system log here.

    Not sure what s supposed to trigger. My system has been up for a few hours now. The ppp link has bounced around a bt resulting in new IP address assignment to the WAN interface. But there isn't any recognisable sign that the DynDns IP address checking code has been called:

    clog /var/log/system.log | grep real\ interface

    Mar 10 17:09:31 pfsense php: : rc.newwanip: on (IP address: 203.144.5.238) (interface: wan) (real interface: pppoe1).
    Mar 10 17:13:14 pfsense php: : rc.newwanip: on (IP address: 203.144.31.15) (interface: wan) (real interface: pppoe1).
    Mar 10 17:19:47 pfsense php: : rc.newwanip: on (IP address: ) (interface: wan) (real interface: pppoe1).
    Mar 10 17:19:54 pfsense php: : rc.newwanip: on (IP address: ) (interface: wan) (real interface: pppoe1).
    Mar 10 17:20:24 pfsense php: : rc.newwanip: on (IP address: ) (interface: wan) (real interface: pppoe1).
    Mar 10 17:20:30 pfsense php: : rc.newwanip: on (IP address: ) (interface: wan) (real interface: pppoe1).
    Mar 10 17:20:55 pfsense php: : rc.newwanip: on (IP address: 203.144.31.17) (interface: wan) (real interface: pppoe1).
    Mar 10 17:58:21 pfsense php: : rc.newwanip: on (IP address: 203.144.19.238) (interface: wan) (real interface: pppoe1).

    clog /var/log/system.log | grep -i dyndns

    Mar 10 17:09:47 pfsense check_reload_status: updating all dyndns

    I'll post the snapshot of the system log if it would be helpful.



  • You use PPPOE, i use DHCP through another router. May be this is the Problem.
    But in the DynDNS Tab the Ip is highlight red if the wan address change. Can be there a Problem with the trigger?
    Who can find this out?

    cheers
    ???



  • Have anyone the same Probs?



  • pfSense does not monitor the dns it monitors the wan ip.
    If you make the router in front of you renew the dhcp lease frequently that will trigger the update process otherwise only once per day it will be triggered.



  • Ok i will try this. Thank you.



  • Is it possible to run the update by adding a cron job in the config.xml. I want to update every hour.?



  • @caleb84:

    Have anyone the same Probs?

    Yes, I actually have the same problem, when I go to Dyndns, Edit and Save, the IP gets green again and becomes updated…
    otherwise it stays red even when I get new WAN IPs



  • @ermal:

    pfSense does not monitor the dns it monitors the wan ip.
    If you make the router in front of you renew the dhcp lease frequently that will trigger the update process otherwise only once per day it will be triggered.

    I presume the intended behaviour is that if the IP address of a DHCP or PPP WAN interface changes a dynamic DNS update should be activated.

    I presume it is not necessary for the address to change frequently to trigger an update attempt but that "frequently" here was meant to suggest using a short DHCP lease time should trigger the dynamic dns updates more frequently which should make it a bit easier to figure out what is happening. Else how frequent do the address changes need to be?

    I have dynamic DNS monitoring my WAN link (which is ppoe) and I can't see any sign that an IP address change on the WAN interface is triggering a dynamic DNS update attempt. Where should I be able to see a sign of a dynDNS update attempt? (Maybe I'm looking in the wrong place.)

    The only time I have been able to see a sign of a dynamic DNS update attempt is when I edit and save a DynDNS entry and then I see a number of lines in the system log.

    I went looking for the mechanism that is supposed to trigger the dynamic DNS update and it looks as if both DHCP and ppp are intended to invoke:

    
    # /usr/local/sbin/pfSctl -c "interface newip $interface"
    
    

    but pfSctl is an application rather than a script and I don't have its source on hand so I can't presently  follow that path any further.



  • There have been multiple people now that have all had this same problem, and they all made the same mistake!

    !!!The Checkbox at the top of the dyndns account settings disables (automatic) Dyndns updates!!!

    So go uncheck it  ;)

    (maybe someone should remove this checkbox or highlight the "disable" somehow, it's easy to overlook, i've made the same mistake, one naturally assumes that its an "enable" switch…)



  • @the6thday:

    !!!The Checkbox at the top of the dyndns account settings disables (automatic) Dyndns updates!!!

    .  .  .

    (maybe someone should remove this checkbox or highlight the "disable" somehow, it's easy to overlook, i've made the same mistake, one naturally assumes that its an "enable" switch…)

    Apologies, the Disable box on my Dynamic DNS entry was checked.  I disabled that disability and the system log reported a Dynamic DNS update. I'll keep an eye on the system to see if it automatically tracks WAN interface IP address changes.

    I'd certainly vote for changing the Disable box to an Enable box (initially not enabled) for greater consistency with other services (e.g. DHCP server, NTP, Captive Portal, PPPoE, RIP and others?)

    While on the subject of UI consistency I'd be interested to hear why the PPPoE server has both an Off radio button and an Enable check box? At first sight the Enable check box seems sufficient.



  • For what it's worth, on m0n0wall, this is an Enable when checked box.



  • I dont have any disabled checkbox activated and I also didn't change my configuration…
    All I did was upgrading from a 2-3month old release to RC1
    All I realized... it was working before..

    I'll give it another try on the weekend and upgrade to the current snapshot...
    If I still have the problem I'll post it here..



  • After an update to the todays version everything works fine again…


Log in to reply