@HopelessErrors said in Dynamic DNS Failing on Start:
This Netgate is powered on at the same time as the WAN device, but the WAN comes up before the Netgate is fully initialized
That's the best scenario.
During boot, ... this happens : read /etc/rc.boot
Lots of stuff is done, and wto of them are :
Interfaces are set up ...
and the DynDNS is send a signal with 'service reload dyndsall'. At that moment, the actual interfaces (normally A WAN) is copared with the last known good IP (it's cached / stored in a file).
If the cached IP and actual WAN IP are the same, nothing happens.
If they are different, an DynDNS update should take place.
I had to reboot my pfSense last week as a part of the monthy UPS / Network / whatever tests.
It rebooted at 10h15 AM.
During the boot process I saw several
which will trigger a dyndns sync.
These are the line that tell me dydnns was trying to :
<27>1 2025-01-23T10:15:56.615087+01:00 pfSense.bhf.tld php-fpm 629 - - /rc.dyndns.update: phpDynDNS: Not updating home.bhf.tld A record because the public IP address cannot be determined.and 1 second later :
<27>1 2025-01-23T10:15:57.628645+01:00 pfSense.bhf.tld php-fpm 57727 - - /rc.dyndns.update: phpDynDNS: Not updating home.bhf.tld A record because the public IP address cannot be determined.so that was a fail twice ... WAN wasn't ready yet I guess ?
But then still in the middle of the boot process (7 seconds later ):
<27>1 2025-01-23T10:16:11.802487+01:00 pfSense.bhf.tld php-fpm 629 - - /rc.dyndns.update: phpDynDNS: Not updating home.bhf.tld A record because the IP address has not changed.Bingo !
The test was done, the IP WAN didn't changed - so there was nothing to do.
The test, it was checking with this URL :
2e256f8c-7d90-41db-b5b5-33fda8550106-image.png
Test for yourself :
http://checkip.dyndns.org
Click and see ^^
and it compared the IP from the URL with the srored, cached IP.
The dyndns cache file is here /cf/conf/ and starts with dyndns_.....
It contains your public WAN IP.
Check the file last modified date time stamp to see when the IP was modified for the last time.
I'm telling you all this, so you can do some checks on your side.