ipv6 compatible checkip service?
-
Hi, is the dyndns script in pfsense aware of ipv6 vs ipv4 when calling a checkip service? My experience is that things are breaking when adding an ipv6 aware checkip service.
Also, it would make sense to allow the use of a configurable checkip selection in the settings of a dyndns entry, this way v6 dyndns entry could be connected to a v6 checkip service. -
@mcfly9 said in ipv6 compatible checkip service?:
Hi, is the dyndns script in pfsense aware of ipv6 vs ipv4 when calling a checkip service? My experience is that things are breaking when adding an ipv6 aware checkip service.
It works for me just fine for both IPv4 and IPv6. What, specifically, is not working for you?
-
@mcfly9 said in ipv6 compatible checkip service?:
the dyndns script in pfsense aware of ipv6 vs ipv4 ...
? have a look ? Here t is : /etc/inc/dyndns.class ^^
.... when calling a checkip service?
This one :
?
Lets check this check service :[25.07.1-RELEASE][root@pfSense.bhf.tld]/root: dig checkip.dyndns.org +short checkip.dyndns.com. 158.101.44.242 193.122.130.0 132.226.247.73 132.226.8.169 193.122.6.168Looks pure IPv4 to me.
I'm not sure if it's useful, but "http://checkipv6.dyndns.org/" exists, and only return IPv6.
When you select a IPv6 DDNS service, it would handle your IPv6 WAN IP :

there a plenty of them.
edit :
adding an ipv6 aware checkip service
When you add you're own, be sure it can handle both.
edit again :
Years ago, on my IPv4/IPv6 webserver, I added this file (whatismyip.php) in the web server root :<?php echo "<html><head><title>Current IP Check</title></head><body>Current IP Address: ".$_SERVER['REMOTE_ADDR']."</body></html>"; ?>When I visit my own web server, like https://mywebserver.tld/whatismyip.php using IPv4, it shows my WAN IPv4.
When the connections uses IPv6, its produces the IPv6 of the visiting device. -
Thanks for the quick replies!
@WN1X said in ipv6 compatible checkip service?:
It works for me just fine for both IPv4 and IPv6. What, specifically, is not working for you?
In my lab testing, I was not able to get the checkip part working.
I'm aware how to configure the dyndns part for ipv6 addresses, at another location I have it working when inferring the public address from the WAN interface (ie: not using the checkip service).
Here's what I have done:
- setup a dyndns entry with Azure v6, enabled verbose logging
- added a checkip service, https://6.ident.me and disabled all other checkip services
SSH'd into pfsense, ran
/etc/rc.dyndns.updateand here's what's in the log:Nov 11 13:10:48 php-cgi 54878 rc.dyndns.update: Dynamic DNS: updatedns() starting Nov 11 13:10:48 php-cgi 54878 rc.dyndns.update: Dynamic DNS (router-c) There was an error trying to determine the public IP for interface - lan (hn1 ).I have verified that the checkip URL returns my IP v6 address properly:
[2.8.1-RELEASE][root@pfsense-c.mydomain.com]/root: curl https://6.ident.me 2603:<redacted>::c2[2.8.1-RELEASE][root@pfsense-c.mydomain.com]/root:@Gertjan said in ipv6 compatible checkip service?:
have a look ? Here t is : /etc/inc/dyndns.class ^^
Ahh, thanks for the pointer, this helps to understand what's under the hood!
@Gertjan said in ipv6 compatible checkip service?:
When I visit my own web server, like https://mywebserver.tld/whatismyip.php using IPv4, it shows my WAN IPv4.
When the connections uses IPv6, its produces the IPv6 of the visiting device.Ah, so use one checkip service that returns ipv4 or ipv6 address based on the version used? I'll try that, thanks!
-
Read a bit of the code, I think the source of my issue cloud be that my WAN interface only has a LUA address, but will debug a bit more.
$this->_dnsRequestIfIPseems to be empty when callingdyndnsCheckIPand then it understandably goes awry. -
$address_familyis correctly set to28(AF_INET6), butget_request_source_addressis returning as false which trips updyndnsCheckIP()and it returnsfalseinstead of calling a checkip service (see around lineservices.inc:4629). -
@mcfly9 said in ipv6 compatible checkip service?:
[2.8.1-RELEASE][root@pfsense-c.mydomain.com]/root: curl https://6.ident.me
curl goes out over your WAN ....
But here :@mcfly9 said in ipv6 compatible checkip service?:
rc.dyndns.update: Dynamic DNS (router-c) There was an error trying to determine the public IP for interface - lan (hn1 ).
it went 'out' to your LAN ?!
@mcfly9 said in ipv6 compatible checkip service?:
ran /etc/rc.dyndns.update
Look at that file : help it a bit by adding the needed (?) argument : the WAN interface ?
-
Hi Gertjan, thanks for your reply. Indeed, I have spotted my mistake too and modified my config. Results were the same:
Running:
[2.8.1-RELEASE][root@pfsense-c.mydomain.com]/root: /etc/rc.dyndns.update wanResults in log:
Nov 11 16:51:41 php-cgi 68487 rc.dyndns.update: Dynamic DNS (router-c) There was an error trying to determine the public IP for interface - wan (hn0 ).I traced the code further, then I found the problem:
dyndnsCheckIPreturns false if the gateway is marked as down.
My gateways don't respond to pings, hence pfsense marked them as down. As soon as I disabled gateway monitoring, it all started working. -
@mcfly9 said in ipv6 compatible checkip service?:
I traced the code further, then I found the problem:
dyndnsCheckIPreturns false if the gateway is marked as down.
My gateways don't respond to pings, hence pfsense marked them as down. As soon as I disabled gateway monitoring, it all started working.Change your gateway monitoring to something further upstream that pfSense can ping. Problem solved!