Dynamic DNS Not Updating when PPPoE Interface IP Changes
I see in the logs:
php: rc.newwanip: Curl error occurred: Failed connect to [host]:80; Operation timed out
If I go in to the edit page and press save it updates without a problem.
So what I notice is the filter reloads after the dyndns update attempt. So in /etc/rc.newwapip I took the lines:
/* signal dyndns update */
And moved those to be after the filter reload:
And now it works, but why it this a feature!?
You would have to have some really unusual rule set for it to need the filter_configure() to happen before traffic could get out to do the dynamic DNS update. My guess is there is some timing thing here - by the time all the other processing has happened the PPPoE has really established and is working. Or maybe you have VPN to a VPN provider and are routing traffic over that to the internet, and so that needs to come back up before dynamic DNS can talk, or?
Post details of anything like that in your configuration.
Try moving "services_dyndns_configure($interface);" to just after the IPsec and OpenVPN reloads - it would be interesting to know if it still works there.
And is this reproducible?
i.e. with the original code is it always a problem? and with the change is it always good?
This is just a standard PPPoE DSL connection. I've searched and found other mentions of this error.
I did attempt to put something like sleep(30); before services_dyndns_configure($interface); line and that did not help. I also tracked down the actual HTTP request in the dyndns code and out the sleep(30); there again with no effect.
I can reproduce it consistently. Unplugging the modem without the code change I would never get the Dynamic DNS updated automatically – it always required manually editing the configuration to force an update. Aftter the code change it always works.
This is multiwan so my theory is the WAN2 isn't opened up to routing traffic through it until the filter is reloaded.
Gertjan last edited by
Read here for some more info https://forum.pfsense.org/index.php?topic=72514.msg427622#msg427622 - I guess I have the same issue.
I've a work around proposed over there.
The end of /etc/rc.newwanip:
....... restart_packages(); filter_configure(); sleep(5); log_error("rc.newwanip: Done some sleeping. Go for DynDNS ..."); /* perform RFC 2136 DNS update */ services_dnsupdate_process($interface); /* signal dyndns update */ services_dyndns_configure($interface); } else /* signal filter reload */ filter_configure(); ?>