Dynamic DNS



  • Hello Everyone,

    I would like to know how often Dynamic DNS Client in PFsense update???

    More exactly the no-ip client, because i have some dynamic ip that change frequently and it doen't update the Internet ip address, even when i wait a couple hours, to make it work i have to edit the setting and click save again.

    Thanks,



  • What version of pfSense are you using?

    What is between the pfSense WAN interface and the Internet - a router or a bridge?



  • it's 2.0Beta4 latest one.
    I have cisco Adsl Routers directly connected to each PFsense.



  • Any Idea???

    @skullripper:

    Hello Everyone,

    I would like to know how often Dynamic DNS Client in PFsense update???

    More exactly the no-ip client, because i have some dynamic ip that change frequently and it doen't update the Internet ip address, even when i wait a couple hours, to make it work i have to edit the setting and click save again.

    Thanks,



  • The system logs please, this is just a crystal ball.
    Also your config dyndns parts.



  • Hi! Sorry for bumping this old thread but the problem I have is basically the same.

    No matter how long I wait, the DDNS client does not update the new IP, it just stays red indefinitely.

    If I edit the DDNS client settings and save them without changing anything it will update it though. Also if I reboot pfsense it will update it too. But it does not update it automatically even though it knows it's not up to date anymore.

    I'm using pfSense 2.0-RC1 (i386) built on Sun Mar 13 06:53:56 EDT 2011.

    This is the network diagram:

    pfSense DDNS Clients:

    pfSense DDNS Client Settings:

    pfSense General Setup:

    What am I missing here? Can anybody give me a hand?
    If you need more info I will gladly provide it.










  • A problem with your configuration is that pfSense doesn't get notified when the public IP address in your ISP router changes.

    There is a cron job that runs at 1:01 (daily) that should update your dynamic DNS registration. Maybe you want that to run more frequently.



  • Here is an extract from the pfSense system log (Status -> System logs, click on System tab) showing a report of the 1:01 WAN IP address check:

    Mar 15 01:01:04 pfsense php: : DynDns: Running updatedns()
    Mar 15 01:01:04 pfsense php: : DynDns: updatedns() starting
    Mar 15 01:01:04 pfsense php: : DynDns: _detectChange() starting.
    Mar 15 01:01:04 pfsense php: : DynDns: _checkIP() starting.
    Mar 15 01:01:04 pfsense php: : DynDns debug information: 203.144.5.171 extracted from local system.
    Mar 15 01:01:04 pfsense php: : DynDns: Current WAN IP: 203.144.5.171
    Mar 15 01:01:04 pfsense php: : DynDns: Cached IP: 203.144.5.171
    Mar 15 01:01:04 pfsense php: : phpDynDNS: No change in my IP address and/or 25 days has not passed. Not updating dynamic DNS entry.

    My configuration differs from yours in that my pfSense WAN interface has a public IP address so the log entry will be a little different. (If the WAN interface has a private IP address the code goes to a web page to get the corresponding public IP address.)



  • Thank you wallabybob.

    Yup! I was just checking /etc/crontab and you're right.

    And yes, I also noticed pfSense was getting the IP from an external service. More precisely from checkip.dyndns.org, at least in my case.

    Anyway it's odd not having a place to configure the update period on webConfigurator. At least not that I noticed.

    Also I don't understand why it doesn't update it as soon as it detects the change.

    Can you tell me if the script will update the IP despite of being up to date or not?

    DDNS service providers are very picky about this…



  • @BlackSpark:

    Anyway it's odd not having a place to configure the update period on webConfigurator. At least not that I noticed.

    I believe there is a package (Cron) to interface to crontab. I have not even attempted to use the Cron package.

    @BlackSpark:

    Also I don't understand why it doesn't update it as soon as it detects the change.

    The script invoked by crontab is the way pfSense detects the change in public IP of a network where the pfSense WAN interface has a private IP address.

    @BlackSpark:

    Can you tell me if the script will update the IP despite of being up to date or not?

    DDNS service providers are very picky about this…

    I have pfSense configured to use DNS-O-matic to update a couple of different dynamic DNS services. I have DNS-O-matic configured to email me when it updates the dynamic DNS services. I only ever see those emails when there really has been an address change.



  • @wallabybob:

    I believe there is a package (Cron) to interface to crontab. I have not even attempted to use the Cron package.

    Thanks. I will check that out.

    @wallabybob:

    The script invoked by crontab is the way pfSense detects the change in public IP of a network where the pfSense WAN interface has a private IP address.

    I got that. Well, to be honest what I know is that the script is run when scheduled. What I don't know are the details of the procedure when it runs. This is… will the script update the info only if it detects a different IP or will it make an update nevertheless?

    Theres is quite a difference because the DDNS service provider can delete the domain name if it's updated too often with the same IP or even delete the account on extreme cases!

    @wallabybob:

    I have pfSense configured to use DNS-O-matic to update a couple of different dynamic DNS services. I have DNS-O-matic configured to email me when it updates the dynamic DNS services. I only ever see those emails when there really has been an address change.

    Judging by what you said I guess it will update only if the IP changes. I will tighten the cron job period and see how it goes.

    But the fact that the IP is displayed in red in the webConfigurator it's kinda misleading. I have now a better understanding of how that works. Correct me if I'm wrong, but I guess there is some php code on that page of the webConfigurator that checks if the IP is up to date whenever the page is loaded. Hence being red or green. But one might think (as I did) that pfSense detected the IP change but did nothing about or failed to update it.

    In fact, it does nothing about it. Only when the cron job is run will the IP be updated on the DDNS provider.

    I think that an option to set up the update period in the DDNS client settings would be very welcome. Just my 2cents.  :)



  • @BlackSpark:

    I think that an option to set up the update period in the DDNS client settings would be very welcome. Just my 2cents.  :)

    I think the current check interval (24 hours) is far too long to be useful when the WAN interface has a private address. Something like 5 to 10 minutes would be much more useful and probably acceptable to dynamic DNS providers. However when the WAN interface has a public IP address which is set by DHCP or PPP then the update period can be long (e.g. 24 hours) because pfSense gets notification of WAN interface address changes from PPP or DHCP.  (There needs to be some updates from time to time to avoid the DNS registration expiring.)



  • I just changed the cron job to run the script every minute (test purposes of course) and reestablished a new connection manually in my ISP router so it would change the IP address. So far so good, it looks like the script updates the IP only if it is a new one.

    I'm will set now the cron job to be run every 5 min and see how it goes in the next 24/48 hours.

    @wallabybob:

    I think the current check interval (24 hours) is far too long to be useful when the WAN interface has a private address.

    Hence the need of an option to easily change that default interval. :)

    @wallabybob:

    However when the WAN interface has a public IP address which is set by DHCP or PPP then the update period can be long (e.g. 24 hours) because pfSense gets notification of WAN interface address changes from PPP or DHCP.  (There needs to be some updates from time to time to avoid the DNS registration expiring.)

    That is another problem was forgetting about!

    If I'm not mistaken DynDNS requires you to make 1 update every 30 days. 60 for No-IP.
    If the script only makes the update when the IP address changes, than I guess one will need to use the funny links on the warning emails they send after that time.  :-\

    EDIT:
    Just found this on the system log: "php: : phpDynDNS: No change in my IP address and/or 25 days has not passed. Not updating dynamic DNS entry."

    I guess problem is solved. Thanks for your cooperation wallabybob.



  • @BlackSpark:

    I'm will set now the cron job to be run every 5 min and see how it goes in the next 24/48 hours.

    pfSense regenerates a lot of configuration files on startup. I suspect you might need something like the Cron package to manipulate crontab in a way that survives reboots and firmware updates.



  • I suspected that also so I installed the "cron package" to be on the safe side.
    It works like a charm and it makes managing cron jobs easier, but I think Vi will do the job too.

    Btw, I also had to restart the cron service manually using the shell after changing the crontab file.

    Once everything was set up and tested I rebooted pfSense to be sure everything's ok.

    So far so good! :)


Log in to reply