Dynamic DNS doesn't work properly after reconnect



  • Hi,

    I'm using latest 2.4 (2017/10/04) and after updating to this version two of my custom dyndns Provider (ddnss.org, dynv6.net) recognitze my new adresse but no-ip and selfhost failed. In past versions all of them failed after a reconnect so I wasn't able to do something from remote.

    The difference I see is that curl try to reach the provider but could not resolve the adresses

    Oct  4 09:04:47 pfSense php-fpm[50529]: /rc.dyndns.update: Curl error occurred: Could not resolve host: dynupdate.no-ip.com
    Oct  4 09:05:17 pfSense php-fpm[50529]: /rc.dyndns.update: Curl error occurred: Could not resolve host: carol.selfhost.de
    Oct  4 09:05:20 pfSense php-fpm[50529]: /rc.dyndns.update: Message sent to x@y.z OK
    Oct  4 09:05:20 pfSense php-fpm[50529]: /rc.dyndns.update: phpDynDNS: updating cache file /conf/dyndns_wancustom''2.cache: xx.12.186.9
    Oct  4 09:05:20 pfSense php-fpm[50529]: /rc.dyndns.update: phpDynDNS (): (Success) IP Address Updated Successfully!
    Oct  4 09:05:21 pfSense php-fpm[50529]: /rc.dyndns.update: Dynamic DNS: updatedns() starting
    Oct  4 09:05:21 pfSense php-fpm[50529]: /rc.dyndns.update: Dynamic DNS custom (): xx.12.186.9 extracted from local system.
    Oct  4 09:05:21 pfSense php-fpm[50529]: /rc.dyndns.update: Dynamic DNS (): running get_failover_interface for wan. found pppoe1
    Oct  4 09:05:21 pfSense php-fpm[50529]: /rc.dyndns.update: Dynamic DNS custom (): xx.12.186.9 extracted from local system.
    Oct  4 09:05:21 pfSense php-fpm[50529]: /rc.dyndns.update: Dynamic Dns (): Current WAN IP: xx.12.186.9 Cached IP: xx.12.190.100
    Oct  4 09:05:21 pfSense php-fpm[50529]: /rc.dyndns.update: DynDns (): Dynamic Dns: cacheIP != wan_ip. Updating. Cached IP: xx.12.190.100 WAN IP: xx.12.186.9
    Oct  4 09:05:21 pfSense php-fpm[50529]: /rc.dyndns.update: Dynamic DNS custom (): _update() starting.
    Oct  4 09:05:21 pfSense php-fpm[50529]: /rc.dyndns.update: Sending request to: https://ipv4.dynv6.com/api/update?hostname=xx.dynv6.net&ipv4=auto&token=xyzxyz
    Oct  4 09:05:22 pfSense php-fpm[50529]: /rc.dyndns.update: Dynamic DNS custom (): _checkStatus() starting.
    Oct  4 09:05:22 pfSense php-fpm[50529]: /rc.dyndns.update: Dynamic DNS custom (): xx.12.186.9 extracted from local system.
    Oct  4 09:05:22 pfSense php-fpm[50529]: /rc.dyndns.update: phpDynDNS: updating cache file /conf/dyndns_wancustom''3.cache: xx.12.186.9
    Oct  4 09:05:22 pfSense php-fpm[50529]: /rc.dyndns.update: phpDynDNS (): (Success) IP Address Updated Successfully!
    Oct  4 09:05:23 pfSense php-fpm[50529]: /rc.dyndns.update: Dynamic DNS: updatedns() starting
    Oct  4 09:05:23 pfSense php-fpm[50529]: /rc.dyndns.update: phpDynDNS: (ERROR!) No Username Provided.
    Oct  4 09:05:23 pfSense php-fpm[50529]: /rc.dyndns.update: phpDynDNS: (ERROR!) No Password Provided.
    Oct  4 09:05:23 pfSense php-fpm[50529]: /rc.dyndns.update: phpDynDNS: (ERROR!) No Hostname Provided.
    Oct  4 09:05:23 pfSense php-fpm[50529]: /rc.dyndns.update: Dynamic DNS custom-v6 (): 2003:ca:ffff:1774:20d:cccc:bbbb:aaaa extracted from local system.
    Oct  4 09:05:23 pfSense php-fpm[50529]: /rc.dyndns.update: Dynamic DNS (): running get_failover_interface for wan. found pppoe1
    Oct  4 09:05:23 pfSense php-fpm[50529]: /rc.dyndns.update: Dynamic DNS custom-v6 (): 2003:ca:ffff:1774:20d:cccc:bbbb:aaaa extracted from local system.
    Oct  4 09:05:23 pfSense php-fpm[50529]: /rc.dyndns.update: Dynamic Dns (): Current WAN IP: 2003:ca:ffff:1774:20d:cccc:bbbb:aaaa Cached IPv6: 2003:ca:ffff:dd8:20d:cccc:bbbb:aaaa
    Oct  4 09:05:23 pfSense php-fpm[50529]: /rc.dyndns.update: DynDns (): Dynamic Dns: cacheIP != wan_ip. Updating. Cached IP: 2003:ca:ffff:dd8:20d:cccc:bbbb:aaaa WAN IP: 2003:ca:ffff:1774:20d:cccc:bbbb:aaaa
    Oct  4 09:05:23 pfSense php-fpm[50529]: /rc.dyndns.update: Dynamic DNS custom-v6 (): _update() starting.
    Oct  4 09:05:23 pfSense php-fpm[50529]: /rc.dyndns.update: Sending request to: https://ipv6.dynv6.com/api/update?hostname=xx.dynv6.net&ipv6=auto&token=xyzxyz
    Oct  4 09:05:24 pfSense php-fpm[50529]: /rc.dyndns.update: Dynamic DNS custom-v6 (): _checkStatus() starting.
    Oct  4 09:05:24 pfSense php-fpm[50529]: /rc.dyndns.update: Dynamic DNS custom-v6 (): 2003:ca:ffff:1774:20d:cccc:bbbb:aaaa extracted from local system.
    Oct  4 09:05:25 pfSense php-fpm[50529]: /rc.dyndns.update: Message sent to x@y.z OK
    Oct  4 09:05:25 pfSense php-fpm[50529]: /rc.dyndns.update: phpDynDNS: updating cache file /conf/dyndns_wancustom-v6''4_v6.cache: 2003:ca:ffff:1774:20d:cccc:bbbb:aaaa
    Oct  4 09:05:25 pfSense php-fpm[50529]: /rc.dyndns.update: phpDynDNS (): (Success) IP Address Updated Successfully!
    
    

    unbound (resolver) is doing a lot of things at startup like dnssec and pfblocker, maybe should /rc.dyndns.update wait until unbound is ready or /rc.dyndns.update should restart after unbound is ready.

    pfadmin



  • i do have exactly the same behaviour. some of my dyn DNS work properly, some like freehost don't update automatically.
    It seems that the "first" of my dns providers does not sync on WAN IP change.



  • As you already figured out, this isn't a "Dynamic DNS" problem, but DNS - on pfSense - problem :
    @pfadmin:

    Oct  4 09:04:47 pfSense php-fpm[50529]: /rc.dyndns.update: Curl error occurred: Could not resolve host: dynupdate.no-ip.com
    Oct  4 09:05:17 pfSense php-fpm[50529]: /rc.dyndns.update: Curl error occurred: Could not resolve host: carol.selfhost.de
    
    

    Maybe unbound isn't ready to resolve yet, after an IP-WAN switch, many process get restarted (and some several times).

    "Waiting for unbound to be ready" seems hard to implement, but delaying "rc.dyndns.update" could do the job.

    Here : https://github.com/pfsense/pfsense/blob/c7500634345edafd633c71f9ec4e183cbbec4ccb/src/etc/inc/services.inc#L1917
    a
    sleep(5);
    ?

    Btw :

    Oct  4 09:05:23 pfSense php-fpm[50529]: /rc.dyndns.update: phpDynDNS: (ERROR!) No Username Provided.
    Oct  4 09:05:23 pfSense php-fpm[50529]: /rc.dyndns.update: phpDynDNS: (ERROR!) No Password Provided.
    Oct  4 09:05:23 pfSense php-fpm[50529]: /rc.dyndns.update: phpDynDNS: (ERROR!) No Hostname Provided.
    
    

    I advice you to remove this part in the setup, or finish the setup.



  • What i did:
    I overrode the dns entry of carol.selfhost.de in the unbound settings. Hope it'll help.