Dyndns "freeDNS API Version 2 (v6)" not working
-
After the upgrade from 24.11 to latest 25.03-BETA, the Dyndns for IPv6 of type "freeDNS API Version 2 (v6)" is not working anymore, the following error is found in the log:
2025-04-18 20:23:08.602892+02:00 php-fpm 65875 /services_dyndns_edit.php: Dynamic DNS freedns2-v6 (my.custom.domain.tld): _update() ending. 2025-04-18 20:23:08.602877+02:00 php-fpm 65875 /services_dyndns_edit.php: Curl error occurred: Could not resolve host: v6.sync.afraid.org 2025-04-18 20:23:08.602855+02:00 php-fpm 65875 /services_dyndns_edit.php: Dynamic DNS freedns2-v6 (my.custom.domain.tld): _checkStatus() starting. 2025-04-18 20:23:08.602825+02:00 php-fpm 65875 /services_dyndns_edit.php: Response Data: 2025-04-18 20:23:08.602796+02:00 php-fpm 65875 /services_dyndns_edit.php: Response Header: 2025-04-18 20:23:08.599820+02:00 php-fpm 65875 /services_dyndns_edit.php: Dynamic DNS freedns2-v6 (nakedandafraid.p1ng.li): _update() starting. 2025-04-18 20:23:08.556484+02:00 php-fpm 65875 /services_dyndns_edit.php: Dynamic DNS: updatedns() starting
v6.sync.afraid.org does resolve but only to AAAA:
[25.03-BETA][root@pfSense]/root: host v6.sync.afraid.org v6.sync.afraid.org has IPv6 address 2607:f0d0:1e04:74::2
Switching back to type "freeDNS (v6)" solved it.
-
That's likely a temporary issue on the system. Both of those DDNS services perform the same curl request but with different URLs. Something to note is that now DDNS supports sending requests over IPv6 and will prefer it if available unless specifically excluded for a DDNS service. The code effectively does the following which you can test out at Diagnostics > Command Prompt > Execute PHP Commands:
$ch = curl_init(); curl_setopt($ch, CURLOPT_IPRESOLVE, AF_INET6); curl_setopt($ch, CURLOPT_INTERFACE, '2001:db8:ffff:5:5::1'); curl_setopt($ch, CURLOPT_URL, 'https://v6.sync.afraid.org/u/'); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_FORBID_REUSE, true); curl_exec($ch); var_dump(@curl_error($ch));
Replace the IPv6 with yours. Testing that here gives:
HTTP/1.1 404 Not Found Server: nginx Date: Fri, 18 Apr 2025 22:59:02 GMT Content-Type: text/html; charset=UTF-8 Transfer-Encoding: chunked Connection: keep-alive Vary: Accept-Encoding Error 404 : Page not found string(0) ""
This indicates that the FQDN was resolvable. Otherwise it prints e.g.:
string(45) "Could not resolve host: v6.example.afraid.org"
-
@marcosm said in Dyndns "freeDNS API Version 2 (v6)" not working:
That's likely a temporary issue on the system
Thanks for the quick response! You think it's a temporary issue on my system or on their end?
Running the above commands indeed works (adding the token to the CURLOPT_ULR) and returns
No IP change detected for my.custom.tld with IP 2a02:168:something::something, skipping update string(0) ""
(switched back and it does not work, same error. Since I now know that the above code works, I'll check what is set and if/how it differs)
-
I think it's a local issue. Does the code work with both IPv4 and IPv6 (set the first line to
AF_INET
for IPv4)? -
@marcosm said in Dyndns "freeDNS API Version 2 (v6)" not working:
I think it's a local issue. Does the code work with both IPv4 and IPv6 (set the first line to AF_INET for IPv4)?
Yes, I do have setup one for IPv4 and one for IPv6, both were working on 24.11 for some time. The issue with IPv6 started after the upgrade to 25.3-BETA.
Parallel there are two (one IPv4 and one IPv6) setup for duckdns.org using the Custom/Custom v6 service, which are running fine too.
-
As a test you can try adding the following patch which will log info about the curl handle used for the request:
diff --git a/src/etc/inc/dyndns.class b/src/etc/inc/dyndns.class index 541d9b6397..4866bf9da6 100644 --- a/src/etc/inc/dyndns.class +++ b/src/etc/inc/dyndns.class @@ -1925,6 +1925,7 @@ $this->_checkStatus($http_code, $curl_error, $data, $header); } if ($this->_dnsVerboseLog) { + log_error(var_export(curl_getinfo($ch), true)); log_error(sprintf(gettext('Dynamic DNS %1$s (%2$s): _update() ending.'), $this->_dnsService, $this->_FQDN)); } }
Try that on both 24.11 and 25.03-BETA and compare the results.
-
@marcosm said in Dyndns "freeDNS API Version 2 (v6)" not working:
Try that on both 24.11 and 25.03-BETA and compare the results.
WAN was always set to DHCP6. Up to 24.11 the IP I got was from the <usual prefix> + EUI64 (ending in :539e). After the upgrade I now get <usual prefix> + ::<only last group is set>. The gateway is the same and all works the same for me.
As for the result of the added log_error(). Quite a few fields are not set in the 25.03 output. But I don't know why they are not set.
The result for 25.03:
2025-04-21 20:43:28.800085+02:00 php-fpm 45310 /services_dyndns_edit.php: Dynamic DNS freedns2-v6 (my.domain.tld): _update() ending. 2025-04-21 20:43:28.800073+02:00 php-fpm 45310 ) 2025-04-21 20:43:28.800067+02:00 php-fpm 45310 'cainfo' => '', 2025-04-21 20:43:28.800060+02:00 php-fpm 45310 'capath' => '', 2025-04-21 20:43:28.800054+02:00 php-fpm 45310 'effective_method' => 'GET', 2025-04-21 20:43:28.800048+02:00 php-fpm 45310 'total_time_us' => 137927, 2025-04-21 20:43:28.800041+02:00 php-fpm 45310 'starttransfer_time_us' => 0, 2025-04-21 20:43:28.800034+02:00 php-fpm 45310 'redirect_time_us' => 0, 2025-04-21 20:43:28.800028+02:00 php-fpm 45310 'pretransfer_time_us' => 0, 2025-04-21 20:43:28.800021+02:00 php-fpm 45310 'namelookup_time_us' => 0, 2025-04-21 20:43:28.800015+02:00 php-fpm 45310 'connect_time_us' => 0, 2025-04-21 20:43:28.800008+02:00 php-fpm 45310 'appconnect_time_us' => 0, 2025-04-21 20:43:28.800002+02:00 php-fpm 45310 'scheme' => 'https', 2025-04-21 20:43:28.799996+02:00 php-fpm 45310 'ssl_verifyresult' => 0, 2025-04-21 20:43:28.799989+02:00 php-fpm 45310 'protocol' => 2, 2025-04-21 20:43:28.799982+02:00 php-fpm 45310 'http_version' => 0, 2025-04-21 20:43:28.799976+02:00 php-fpm 45310 'local_port' => -1, 2025-04-21 20:43:28.799970+02:00 php-fpm 45310 'local_ip' => '', 2025-04-21 20:43:28.799963+02:00 php-fpm 45310 'primary_port' => -1, 2025-04-21 20:43:28.799957+02:00 php-fpm 45310 ), 2025-04-21 20:43:28.799950+02:00 php-fpm 45310 array ( 2025-04-21 20:43:28.799944+02:00 php-fpm 45310 'certinfo' => 2025-04-21 20:43:28.799938+02:00 php-fpm 45310 'primary_ip' => '', 2025-04-21 20:43:28.799931+02:00 php-fpm 45310 'redirect_url' => '', 2025-04-21 20:43:28.799925+02:00 php-fpm 45310 'redirect_time' => 0.0, 2025-04-21 20:43:28.799918+02:00 php-fpm 45310 'starttransfer_time' => 0.0, 2025-04-21 20:43:28.799912+02:00 php-fpm 45310 'upload_content_length' => -1.0, 2025-04-21 20:43:28.799905+02:00 php-fpm 45310 'download_content_length' => -1.0, 2025-04-21 20:43:28.799899+02:00 php-fpm 45310 'speed_upload' => 0.0, 2025-04-21 20:43:28.799892+02:00 php-fpm 45310 'speed_download' => 0.0, 2025-04-21 20:43:28.799886+02:00 php-fpm 45310 'size_download' => 0.0, 2025-04-21 20:43:28.799879+02:00 php-fpm 45310 'size_upload' => 0.0, 2025-04-21 20:43:28.799873+02:00 php-fpm 45310 'pretransfer_time' => 0.0, 2025-04-21 20:43:28.799867+02:00 php-fpm 45310 'connect_time' => 0.0, 2025-04-21 20:43:28.799860+02:00 php-fpm 45310 'namelookup_time' => 0.0, 2025-04-21 20:43:28.799854+02:00 php-fpm 45310 'total_time' => 0.137927, 2025-04-21 20:43:28.799848+02:00 php-fpm 45310 'redirect_count' => 0, 2025-04-21 20:43:28.799841+02:00 php-fpm 45310 'ssl_verify_result' => 0, 2025-04-21 20:43:28.799833+02:00 php-fpm 45310 'filetime' => -1, 2025-04-21 20:43:28.799827+02:00 php-fpm 45310 'request_size' => 0, 2025-04-21 20:43:28.799820+02:00 php-fpm 45310 'header_size' => 0, 2025-04-21 20:43:28.799814+02:00 php-fpm 45310 'http_code' => 0, 2025-04-21 20:43:28.799807+02:00 php-fpm 45310 'content_type' => NULL, 2025-04-21 20:43:28.799800+02:00 php-fpm 45310 'url' => 'https://v6.sync.afraid.org/u/<MYTOKEN>/?hostname=my.domain.tld&myip=2a02:168:...::27', 2025-04-21 20:43:28.799791+02:00 php-fpm 45310 /services_dyndns_edit.php: array ( 2025-04-21 20:43:28.799720+02:00 php-fpm 45310 /services_dyndns_edit.php: Curl error occurred: Could not resolve host: v6.sync.afraid.org 2025-04-21 20:43:28.799701+02:00 php-fpm 45310 /services_dyndns_edit.php: Dynamic DNS freedns2-v6 (my.domain.tld): _checkStatus() starting. 2025-04-21 20:43:28.799674+02:00 php-fpm 45310 /services_dyndns_edit.php: Response Data: 2025-04-21 20:43:28.799645+02:00 php-fpm 45310 /services_dyndns_edit.php: Response Header: 2025-04-21 20:43:28.605545+02:00 php-fpm 45310 /services_dyndns_edit.php: Dynamic DNS freedns2-v6 (my.domain.tld): _update() starting.
and from 24.11:
2025-04-21 20:52:19.162563+02:00 php-fpm 623 /services_dyndns_edit.php: Dynamic DNS freedns2-v6 (my.domain.tld): _update() ending. 2025-04-21 20:52:19.162548+02:00 php-fpm 623 ) 2025-04-21 20:52:19.162541+02:00 php-fpm 623 'cainfo' => '', 2025-04-21 20:52:19.162533+02:00 php-fpm 623 'capath' => '', 2025-04-21 20:52:19.162526+02:00 php-fpm 623 'effective_method' => 'GET', 2025-04-21 20:52:19.162518+02:00 php-fpm 623 'total_time_us' => 1268135, 2025-04-21 20:52:19.162511+02:00 php-fpm 623 'starttransfer_time_us' => 1268077, 2025-04-21 20:52:19.162503+02:00 php-fpm 623 'redirect_time_us' => 0, 2025-04-21 20:52:19.162495+02:00 php-fpm 623 'pretransfer_time_us' => 1012777, 2025-04-21 20:52:19.162488+02:00 php-fpm 623 'namelookup_time_us' => 620555, 2025-04-21 20:52:19.162480+02:00 php-fpm 623 'connect_time_us' => 752440, 2025-04-21 20:52:19.162473+02:00 php-fpm 623 'appconnect_time_us' => 1012658, 2025-04-21 20:52:19.162465+02:00 php-fpm 623 'scheme' => 'https', 2025-04-21 20:52:19.162457+02:00 php-fpm 623 'ssl_verifyresult' => 0, 2025-04-21 20:52:19.162450+02:00 php-fpm 623 'protocol' => 2, 2025-04-21 20:52:19.162442+02:00 php-fpm 623 'http_version' => 2, 2025-04-21 20:52:19.162435+02:00 php-fpm 623 'local_port' => 6642, 2025-04-21 20:52:19.162427+02:00 php-fpm 623 'local_ip' => '2a02:168:...:539e', 2025-04-21 20:52:19.162419+02:00 php-fpm 623 'primary_port' => 443, 2025-04-21 20:52:19.162412+02:00 php-fpm 623 ), 2025-04-21 20:52:19.162404+02:00 php-fpm 623 array ( 2025-04-21 20:52:19.162397+02:00 php-fpm 623 'certinfo' => 2025-04-21 20:52:19.162389+02:00 php-fpm 623 'primary_ip' => '2607:f0d0:1e04:74::2', 2025-04-21 20:52:19.162381+02:00 php-fpm 623 'redirect_url' => '', 2025-04-21 20:52:19.162374+02:00 php-fpm 623 'redirect_time' => 0.0, 2025-04-21 20:52:19.162366+02:00 php-fpm 623 'starttransfer_time' => 1.268077, 2025-04-21 20:52:19.162358+02:00 php-fpm 623 'upload_content_length' => 0.0, 2025-04-21 20:52:19.162351+02:00 php-fpm 623 'download_content_length' => -1.0, 2025-04-21 20:52:19.162343+02:00 php-fpm 623 'speed_upload' => 0.0, 2025-04-21 20:52:19.162336+02:00 php-fpm 623 'speed_download' => 75.0, 2025-04-21 20:52:19.162328+02:00 php-fpm 623 'size_download' => 96.0, 2025-04-21 20:52:19.162321+02:00 php-fpm 623 'size_upload' => 0.0, 2025-04-21 20:52:19.162313+02:00 php-fpm 623 'pretransfer_time' => 1.012777, 2025-04-21 20:52:19.162306+02:00 php-fpm 623 'connect_time' => 0.75244, 2025-04-21 20:52:19.162298+02:00 php-fpm 623 'namelookup_time' => 0.620555, 2025-04-21 20:52:19.162291+02:00 php-fpm 623 'total_time' => 1.268135, 2025-04-21 20:52:19.162283+02:00 php-fpm 623 'redirect_count' => 0, 2025-04-21 20:52:19.162275+02:00 php-fpm 623 'ssl_verify_result' => 0, 2025-04-21 20:52:19.162267+02:00 php-fpm 623 'filetime' => -1, 2025-04-21 20:52:19.162260+02:00 php-fpm 623 'request_size' => 184, 2025-04-21 20:52:19.162252+02:00 php-fpm 623 'header_size' => 186, 2025-04-21 20:52:19.162245+02:00 php-fpm 623 'http_code' => 200, 2025-04-21 20:52:19.162237+02:00 php-fpm 623 'content_type' => 'text/plain;charset=UTF-8', 2025-04-21 20:52:19.162228+02:00 php-fpm 623 'url' => 'https://v6.sync.afraid.org/u/<MYTOKEN>/?hostname=my.domain.tld&myip=2a02:168:...:539e', 2025-04-21 20:52:19.162215+02:00 php-fpm 623 /services_dyndns_edit.php: array ( 2025-04-21 20:52:19.162147+02:00 php-fpm 623 /services_dyndns_edit.php: Dynamic DNS freedns2-v6 (my.domain.tld): _checkStatus() ending. 2025-04-21 20:52:19.162116+02:00 php-fpm 623 /services_dyndns_edit.php: phpDynDNS (my.domain.tld): (Success) IP Address Changed Successfully! 2025-04-21 20:52:19.161976+02:00 php-fpm 623 /services_dyndns_edit.php: phpDynDNS: updating cache file /conf/dyndns_wanfreedns2-v6'my.domain.tld'3_v6.cache: 2a02:168:...:539e 2025-04-21 20:52:19.159426+02:00 php-fpm 623 /services_dyndns_edit.php: Dynamic DNS freedns2-v6 (my.domain.tld): 2a02:168:...:539e extracted from local system. 2025-04-21 20:52:19.157769+02:00 php-fpm 623 /services_dyndns_edit.php: Dynamic DNS freedns2-v6 (my.domain.tld): _checkIP() starting. 2025-04-21 20:52:19.157640+02:00 php-fpm 623 /services_dyndns_edit.php: Dynamic DNS freedns2-v6 (my.domain.tld): _checkStatus() starting. 2025-04-21 20:52:19.157598+02:00 php-fpm 623 /services_dyndns_edit.php: Response Data: Updated my.domain.tld from 2a02:168:..::27 to 2a02:168:...:539e 2025-04-21 20:52:19.157587+02:00 php-fpm 623 /services_dyndns_edit.php: Response Header: 2025-04-21 20:52:19.157577+02:00 php-fpm 623 /services_dyndns_edit.php: Response Header: 2025-04-21 20:52:19.157567+02:00 php-fpm 623 /services_dyndns_edit.php: Response Header: Vary: Accept-Encoding 2025-04-21 20:52:19.157557+02:00 php-fpm 623 /services_dyndns_edit.php: Response Header: Connection: keep-alive 2025-04-21 20:52:19.157547+02:00 php-fpm 623 /services_dyndns_edit.php: Response Header: Transfer-Encoding: chunked 2025-04-21 20:52:19.157537+02:00 php-fpm 623 /services_dyndns_edit.php: Response Header: Content-Type: text/plain;charset=UTF-8 2025-04-21 20:52:19.157526+02:00 php-fpm 623 /services_dyndns_edit.php: Response Header: Date: Mon, 21 Apr 2025 18:45:31 GMT 2025-04-21 20:52:19.157515+02:00 php-fpm 623 /services_dyndns_edit.php: Response Header: Server: nginx 2025-04-21 20:52:19.157478+02:00 php-fpm 623 /services_dyndns_edit.php: Response Header: HTTP/1.1 200 OK 2025-04-21 20:52:17.889137+02:00 php-fpm 623 /services_dyndns_edit.php: Dynamic DNS freedns2-v6 (my.domain.tld): _update() starting. 2025-04-21 20:52:17.889043+02:00 php-fpm 623 /services_dyndns_edit.php: Dynamic DNS (my.domain.tld): running get_failover_interface for wan. found ax0 2025-04-21 20:52:17.889006+02:00 php-fpm 623 /services_dyndns_edit.php: Dynamic DNS freedns2-v6 (my.domain.tld): 2a02:168:...:539e extracted from local system. 2025-04-21 20:52:17.856213+02:00 php-fpm 623 /services_dyndns_edit.php: Dynamic DNS freedns2-v6 (my.domain.tld): _checkIP() starting. 2025-04-21 20:52:17.856051+02:00 php-fpm 623 /services_dyndns_edit.php: Dynamic DNS: updatedns() starting
-
25.03 :
@patient0 said in Dyndns "freeDNS API Version 2 (v6)" not working:
2025-04-21 20:43:28.799720+02:00 php-fpm 45310 /services_dyndns_edit.php: Curl error occurred: Could not resolve host: v6.sync.afraid.org
That's a show stopper.
Resolving works over IPv4 and IPv6 and should answer "2607:f0d0:1e04:74::2"
It works for me : -
@Gertjan said in Dyndns "freeDNS API Version 2 (v6)" not working:
That's a show stopper.
Yes, but it's not that easy. Marco is assisting me in debugging the issue.
I suspect the issue is because it got an IPv6 DNS record only. The
curl
call get's assembled in the code but it fails to detect it as IPv6 and attempts using IPv4.But we will get there, there are multiple work arounds, so no pressing issue.
-
@patient0 said in Dyndns "freeDNS API Version 2 (v6)" not working:
I suspect the issue is because it got an IPv6 DNS record only. The curl call get's assembled in the code but it fails to detect it as IPv6 and attempts using IPv4.
v6.sync.afraid.org can be resolved using IPv4 or IPv6.
If IPv6 was tried first, but failed, then the resolver would (should !) use the good old IPv4.[25.03-BETA][root@pfSense.bhf.tld]/root: dig -4 @127.0.0.1 v6.sync.afraid.org AAAA +short 2607:f0d0:1e04:74::2
Its normal that "v6.sync.afraid.org" only resolves to IPv6 ... a bit like ipv6.google.com is an IPv6 only host name.
See here : https://freedns.afraid.org/guide/dd-wrt-v2/ -
@Gertjan said in Dyndns "freeDNS API Version 2 (v6)" not working:
v6.sync.afraid.org can be resolved using IPv4 or IPv6.
Yes of course, but: it did work on 24.11 and it doesn't work anymore. I don't know where in the PHP code the confused starts and there is a lot of new code in 25.03 for that part. I couldn't locate it yet, Marco will have better chance doing that I guess.
(It happens in /etc/inc/dyndns.class and /etc/inc/services.inc)
-
For reference:
https://redmine.pfsense.org/issues/16156