Hi there, my public IPv6 address is changing from time to time (at least after every reboot). I'm trying to keep it updated using the DynamicDNS package, but with wget
and curl
I get the following errors:
211507 : #> /usr/bin/curl -RsS -o /var/run/ddns/myddns_ipv6.dat --stderr /var/run/ddns/myddns_ipv6.err --interface br-lan --noproxy '*' 'https://<USERNAME>:<PASSWORD>@www.ovh.com/nic/update?system=dyndns&hostname=<DOMAIN>&myip=<IPv6>'
211510 ERROR : cURL Error: '7'
211510 : curl: (7) Failed to connect to www.ovh.com port 443 after 3093 ms: Error
[...]
213201 : #> /usr/bin/wget --hsts-file=/tmp/.wget-hsts -nv -t 1 -O /var/run/ddns/myddns_ipv6.dat -o /var/run/ddns/myddns_ipv6.err --bind-address=<IPv6> --no-proxy 'https://<USERNAME>:<PASSWORD>@www.ovh.com/nic/update?system=dyndns&hostname=<DOMAIN>&myip=<IPv6>'
213202 ERROR : GNU Wget Error: '4'
213202 : failed: Address family not supported by protocol.
Interestingly running curl
manually works, as long as I don't use --interface br-lan
. The same applies to wget
as long as --bind-address
is not specified or the IPv4 address of br-lan
.
<> root@OpenWrt:/var/run/ddns# url="https://${username}:${password}@www.ovh.com/nic/update?system=dyndns&hostname=${domain}&myip=${ip}"
<> root@OpenWrt:~# curl "$url"
good <IP>
<> root@OpenWrt:~# curl --interface br-lan "$url"
curl: (7) Failed to connect to www.ovh.com port 443 after 2955 ms: Error
<> root@OpenWrt:~# wget --bind-address=192.168.175.254 "$url" -o result-good.log -O result-good
<> root@OpenWrt:~# wget --bind-address=$ip "$url" -o result-bad.log -O result-bad
<> root@OpenWrt:~# cat result-good.log
--2024-05-09 21:49:04-- https://<USERNAME>:<PASSWORD>@www.ovh.com/nic/update?system=dyndns&hostname=<DOMAIN>&myip=<IPv6>
Resolving www.ovh.com... 198.27.92.1
Connecting to www.ovh.com|198.27.92.1|:443... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Authentication selected: Basic realm="Authenticated Users Only"
Reusing existing connection to www.ovh.com:443.
HTTP request sent, awaiting response... 200 OK
Length: 27 [text/plain]
Saving to: 'result-good'
0K 100% 2.54M=0s
2024-05-09 21:49:05 (2.54 MB/s) - 'result-good' saved [27/27]
<> root@OpenWrt:~# cat result-good
nochg <IP>
<> root@OpenWrt:~# cat result-bad.log
--2024-05-09 21:48:44-- https://<USERNAME>:<PASSWORD>@www.ovh.com/nic/update?system=dyndns&hostname=<DOMAIN>&myip=<IPv6>
Resolving www.ovh.com... 198.27.92.1
Connecting to www.ovh.com|198.27.92.1|:443... failed: Address family not supported by protocol.
Is there some reason it tries to use --interface
and IPv6 address specifically? Is there an option I overlooked, where I can modify the command doing the webrequest? There is no AAAA result for www.ovh.com
unfortunately.
For completeness is here my current configuration:
config ddns 'global'
option ddns_dateformat '%F %R'
option ddns_loglines '250'
option ddns_rundir '/var/run/ddns'
option ddns_logdir '/var/log/ddns'
option use_curl '1'
config service 'myddns_ipv6'
option update_url 'https://[USERNAME]:[PASSWORD]@www.ovh.com/nic/update?system=dyndns&hostname=[DOMAIN]&myip=[IP]'
option lookup_host <HOSTNAME>
option domain <DOMAIN>
option username <USERNAME>
option password <PASSWORD>
option use_ipv6 '1'
option interface 'lan'
option ip_source 'network'
option ip_network 'lan'
option enabled '1'
option use_syslog '2'
option check_unit 'minutes'
option force_unit 'minutes'
option retry_unit 'seconds'
Also fun fact, selecting OVH as service provider reports that IPv6 is not supported. I don't know why this is the case (I assume because there is only an URL configured for IPv4) and whether this can be updated.