Dynamic DNS Update Not Working
-
Ever since I migrated to new hardware and upgraded to 2.7, my dynamic DNS with FreeDNS will not update when it was previously working in 2.6. I tried searching the forums, but none of the existing posts have helped.
My old router was a Dell PowerEdge 1950 running 2.6 CE. My new router is a Beelink EQ12 running 2.7 CE. I backed up my configuration before I shutdown my old router, booted my new router (I already installed 2.7 CE), and restored my configuration.
Here is the dashboard of my new router:
Note: I’m with Starlink so I have to deal with CGNAT. To get port forwarding working I signed up with Hoppy which gives me a WireGuard tunnel with which to forward ports. That all works correctly.
First, I checked the logs. The correct IP gets detected (the Hoppy IP).
Next, I deleted and recreated my FreeDNS entry making sure I used my API key for the password. Here is the settings screen:
Then, I tried to force an update. Here is the output of the log:
Next, just to confirm things do work with FreeDNS, I manually updated from the SSH console on the router using curl. Here is the output:
Unfortunately, since this is a built-in service, I’m unable to uninstall and reinstall the package with the “preserve data” option unchecked.
At this point, I’m unable to debug further. Does anyone have any suggestions?
-
@toriol said in Dynamic DNS Update Not Working:
suggestions
Yes.
You used curl, like the scripted version.
With one difference :
So, use curl again, and select manually this tun_wg0 ? interface.
Redo the same command, and add the -v or --verbose option. Can you see which interface curl used ?
This interface worked.Now, chose the interface that you've set up in the GUI WG0 :
Something like
curl --verbose --interface tun_wg0 ..........The parent interface used is OPT1 - not WAN ?
-
I don't get it, this hoppy-service has a dynamic IP too?
-
I tried as suggested. I got an SSL timeout. Just to be sure, I tried www.google.com. That seems to work.
Just to make sure I'm hitting the right server, I did a quick DNS query. The IP addresses for freedns.afraig.org match.
Yes, the parent interface is OPT1. That's the interface tied to the WireGuard tunnel that goes to Hoppy that handles the port forwarding. I want the dynamic DNS to update to the Hoppy IP so that the services I expose have a friendly name.
-
@Bob-Dig No, not a dynamic IP. I get a static IP, but more importantly I get a port forwarding service because I can't forward ports over Starlink which uses CGNAT.
-
@toriol said in Dynamic DNS Update Not Working:
I got an SSL timeout.
Yep :
The other side never answers.
So, you can't reach 69.42.215.252 (port 443) using that interface.Can you ping it ?
If so, there is no routing issue. and your request is blocked at the "afraid.org" gates ( using a using a VPN filter, which I can understand )
If not : routing issue or tunnel not connected. -
Just to confirm this isn't an SSL issue I checked the certificate chain using Qualys SSL Labs:
Then, as you suggested, I checked ping using the tun_wg0 interface as the source. That didn't work. Just to be sure I checked using my normal gateway. That didn't work either. I'm assuming freedns.afraid.org does not respond to ping.
That did get me thinking about the routing possibility. I have NAT and FW rules in-place to accept port forward traffic only. No outbound masquerading rules exist. On the FreeDNS documentation page it says you can override the address reported so I tried that.
That worked. I assume that's because it sent the request over my default gateway. I don't plan on allowing masquerading over the tun_wg0 interface since it's supposed to be inbound port forwards only.
This is weird for me because this all worked in 2.6 without any special curl commands. I see there is a custom DNS option along with the ability to send the update request from a different interface. I'm going to see if I can get that to work.
-
I got the custom DNS to work for the most part. I originally left the password as the token and set the URL to https://freedns.afraid.org/update.php. That didn't work so then I left the username and password fields blank. I put the entire update URL including the token in the URL field. Here is my configuration:
This is unfortunate since my token is now logged in plain text.
The only part I can't get working is the result match. The output from FreeDNS includes the time taken to update which I can't seem to use regex to match. I've removed it and now things seem to work again.
It would be nice if the native FreeDNS settings included the option to select the update interface, but I'm happy with this for now.
-
Yeah, it doesn't reply to ping.
If the resulting message contains "Updated" then you're good, no need to match more then that.
I'm using freedns.afraid.org myself for other service : backup DNS servers for my host names.
Never used their dynamic host name services before.
I've created a host name : "just-a-test.chickenkiller.com".I thought the GUI 'afraid' password was needed, but it was the token.
I found the token here :It's mentioned in the script several times.
So, no 'user' neither 'password'.
From bottom to top :
2023-10-16 07:47:59.425777+02:00 php-fpm 65511 /services_dyndns_edit.php: Dynamic DNS freedns (just-a-test.chickenkiller.com): _update() ending. 2023-10-16 07:47:59.425682+02:00 php-fpm 65511 /services_dyndns_edit.php: Dynamic DNS freedns (just-a-test.chickenkiller.com): _checkStatus() ending. 2023-10-16 07:47:59.425577+02:00 php-fpm 65511 /services_dyndns_edit.php: phpDynDNS (just-a-test.chickenkiller.com): (Success) No Change In IP Address 2023-10-16 07:47:59.425125+02:00 php-fpm 65511 /services_dyndns_edit.php: phpDynDNS: updating cache file /conf/dyndns_wanfreedns'just-a-test.chickenkiller.com'1.cache: 82.127.26.111 2023-10-16 07:47:59.422062+02:00 php-fpm 65511 /services_dyndns_edit.php: Dynamic DNS freedns (just-a-test.chickenkiller.com): 82.127.26.111 extracted from Check IP Service 2023-10-16 07:47:58.521987+02:00 php-fpm 65511 /services_dyndns_edit.php: Dynamic DNS freedns (just-a-test.chickenkiller.com): _checkIP() starting. 2023-10-16 07:47:58.521864+02:00 php-fpm 65511 /services_dyndns_edit.php: Dynamic DNS freedns (just-a-test.chickenkiller.com): _checkStatus() starting. 2023-10-16 07:47:58.521814+02:00 php-fpm 65511 /services_dyndns_edit.php: Response Data: ERROR: Address 82.127.26.111 has not changed. 2023-10-16 07:47:58.521797+02:00 php-fpm 65511 /services_dyndns_edit.php: Response Header: 2023-10-16 07:47:58.521782+02:00 php-fpm 65511 /services_dyndns_edit.php: Response Header: 2023-10-16 07:47:58.521767+02:00 php-fpm 65511 /services_dyndns_edit.php: Response Header: X-Cache: MISS 2023-10-16 07:47:58.521740+02:00 php-fpm 65511 /services_dyndns_edit.php: Response Header: Expires: Mon, 26 Jul 1997 05:00:00 GMT 2023-10-16 07:47:58.521725+02:00 php-fpm 65511 /services_dyndns_edit.php: Response Header: Pragma: no-cache 2023-10-16 07:47:58.521710+02:00 php-fpm 65511 /services_dyndns_edit.php: Response Header: Cache-Control: post-check=0, pre-check=0 2023-10-16 07:47:58.521696+02:00 php-fpm 65511 /services_dyndns_edit.php: Response Header: Cache-Control: no-store, no-cache, must-revalidate 2023-10-16 07:47:58.521680+02:00 php-fpm 65511 /services_dyndns_edit.php: Response Header: Vary: Accept-Encoding 2023-10-16 07:47:58.521665+02:00 php-fpm 65511 /services_dyndns_edit.php: Response Header: Connection: keep-alive 2023-10-16 07:47:58.521650+02:00 php-fpm 65511 /services_dyndns_edit.php: Response Header: Transfer-Encoding: chunked 2023-10-16 07:47:58.521635+02:00 php-fpm 65511 /services_dyndns_edit.php: Response Header: Content-Type: text/plain;charset=UTF-8 2023-10-16 07:47:58.521620+02:00 php-fpm 65511 /services_dyndns_edit.php: Response Header: Date: Mon, 16 Oct 2023 05:47:41 GMT 2023-10-16 07:47:58.521603+02:00 php-fpm 65511 /services_dyndns_edit.php: Response Header: Server: nginx 2023-10-16 07:47:58.521564+02:00 php-fpm 65511 /services_dyndns_edit.php: Response Header: HTTP/1.1 200 OK 2023-10-16 07:47:57.708502+02:00 php-fpm 65511 /services_dyndns_edit.php: Dynamic DNS freedns (just-a-test.chickenkiller.com): _update() starting. 2023-10-16 07:47:57.708472+02:00 php-fpm 65511 /services_dyndns_edit.php: DynDns (just-a-test.chickenkiller.com): Dynamic Dns: cacheIP != wan_ip. Updating. Cached IP: 0.0.0.0 WAN IP: 82.127.26.111 Initial update. 2023-10-16 07:47:57.708434+02:00 php-fpm 65511 /services_dyndns_edit.php: Dynamic Dns (just-a-test.chickenkiller.com): Current WAN IP: 82.127.26.111 No Cached IP found. 2023-10-16 07:47:57.708183+02:00 php-fpm 65511 /services_dyndns_edit.php: Dynamic DNS freedns (just-a-test.chickenkiller.com): 82.127.26.111 extracted from Check IP Service 2023-10-16 07:47:56.161143+02:00 php-fpm 65511 /services_dyndns_edit.php: Dynamic DNS freedns (just-a-test.chickenkiller.com): _checkIP() starting. 2023-10-16 07:47:56.161116+02:00 php-fpm 65511 /services_dyndns_edit.php: Dynamic DNS freedns (just-a-test.chickenkiller.com): _detectChange() starting. 2023-10-16 07:47:56.160937+02:00 php-fpm 65511 /services_dyndns_edit.php: Dynamic DNS (just-a-test.chickenkiller.com): running get_failover_interface for wan. found ix3 2023-10-16 07:47:56.160875+02:00 php-fpm 65511 /services_dyndns_edit.php: Dynamic DNS freedns (just-a-test.chickenkiller.com): 82.127.26.111 extracted from Check IP Service 2023-10-16 07:47:54.728922+02:00 php-fpm 65511 /services_dyndns_edit.php: Dynamic DNS freedns (just-a-test.chickenkiller.com): _checkIP() starting. 2023-10-16 07:47:54.727893+02:00 php-fpm 65511 /services_dyndns_edit.php: Dynamic DNS: updatedns() starting
I had of course a soft error, as my IPv4 didn't change, it was already set to the correct IP addresses.
You agree, nothing changed @ freedns ?!