I'm trying to use ddns-scripts to map my public ipv4 and ipv6 address to a hostname using duckdns.org.
My configuration for ipv4 works fine, but when trying it for ipv6, it gives the error "GNU Wget Error: '4' failed: Address family not supported by protocol".
I suspect there isn't a problem with my configs as they are virtually identical, with the only exception using wan6 for the IPv6 configuration. But here they are anyway.
The relevant excerpt from the ddns log is as follows:
165926 : Detect registered/public IP
165926 : #> /usr/bin/nslookup <username>.duckdns.org >/var/run/ddns/DuckDNS_ipv6.dat 2>/var/run/ddns/DuckDNS_ipv6.err
165926 WARN : NO valid IP found
165926 WARN : Error in 'expand_ipv6()' - invalid IPv6 found: '' expanded: ''
165926 info : Starting main loop at 2023-10-25 16:59
165926 : Detect current IP on 'network'
165926 : Current IP '<current IPv6>' detected on network 'wan6'
165926 : Update needed - L: '<long IPv6>' <> R: 'invalid'
165926 : Force communication via IP '<current IPv6>'
165926 : #> /usr/bin/wget --hsts-file=/tmp/.wget-hsts -nv -t 1 -O /var/run/ddns/DuckDNS_ipv6.dat -o /var/run/ddns/DuckDNS_ipv6.err --bind-address=<current IPv6> --ca-directory=/etc/ssl/certs --no-proxy 'https://www.duckdns.org/update?domains=<username>.duckdns.org&token=***PW***&ipv6=<long IPv6>'
165926 ERROR : GNU Wget Error: '4'
165926 : failed: Address family not supported by protocol.
failed: Address family not supported by protocol.
failed: Address family not supported by protocol.
165926 WARN : Transfer failed - retry 1/0 in 60 seconds
When googling this issue, the majority of the results all point this error message pertaining to opkg updates failing or internet not working, neither of which are issues for me.
I'm looking for suggestions of what to try next. Thanks!
I see that others have liked this solution, so that gives me confidence that you are correct. However after reading more about this, I am either confused or I think the solution is not correct. I'm going to go on the assumption I'm confused for the moment.
From what I can see, the duckdns documentation only says it is unable to autodetect your IPv6 address when you login to their website and they say that you need to manually specify it, either by pasting it into the field on their website or by making a specific http GET request from your browser or curl, wget, etc.
ddns-scripts in OpenWrt is attempting to make this http request using wget and has nothing to do with the autodetection limitation of the duckdns website.
I'm able to successfully manually execute this http GET request using both wget and curl from the OpenWrt console, so that tells me there should be no limitation of OpenWrt's ability to do this via ddns-scripts.
See the text I quoted in my previous response - they simply have no IPv6 connectivity due to AWS restrictions. You can also use nslookup www.duckdns.org to see that they have no IPv6 addresses (AAAA records).
I see that but I still am not understanding something. On the DuckDNS website, I can manually enter both IPv4 and IPv6 addresses. If I manually enter my public IPv6 address, I can then nslookup my domain and it will report the IPv6 address I entered. This means it does have IPv6 connectivity, no?
... that web site itself is reachable over IPv4 only. The same is applicable to automated updates.
The whole problem is around their web site, not the customers domains.
Thanks for taking the time to answer my questions. I do appreciate it.
Why is it an issue that DuckDNS.org doesn't have an IPv6 address? I don't understand how it relates to the problem I am having.
I can map my public IPv6 address to my domain
manually on their website
or via "https://www.duckdns.org/update?domains={host}.duckdns.org&token={token}&ipv6={current ipv6 address}&verbose=true" using curl, wget, or just by pasting it into the url bar of my browser.
Both of these methods work successfully and I can see my IPv6 address when using nslookup on my domain.
I want to automate this updating process and found that OpenWrt has the packages ddns-scripts or luci-app-ddns which are just wrappers that ultimately make the GET request above using wget.
I don't understand why it works manually but not with these OpenWrt packages.
I get that when I make the GET request manually, I'm doing so over IPv4. It's clear that DuckDNS expects me to update my IPv6 address in this GET request over IPv4. Do these OpenWrt packages try to update my IPv6 address over IPv6 instead of IPv4? If so, is there not a way to tell it to use IPv4 instead?
/etc/config/ddns has entries for both ip_network and interface. I think I understand that ip_network is used as the location to determine the current IPv6 address and interface is used as the interface that sends the GET request. I tried setting ip_network to wan6 and interface to just wan but still get the same error in my initial post.
In short, I can update my IPv6 address on DuckDNS. Why can't OpenWrt?
165926 : Detect registered/public IP
# you force via your config the ddns script to find an ipv6 address, which cannot
165926 : #> /usr/bin/nslookup <username>.duckdns.org >/var/run/ddns/DuckDNS_ipv6.dat 2>/var/run/ddns/DuckDNS_ipv6.err
165926 WARN : NO valid IP found
165926 WARN : Error in 'expand_ipv6()' - invalid IPv6 found: '' expanded: ''
165926 info : Starting main loop at 2023-10-25 16:59
165926 : Detect current IP on 'network'
# it detects your WAN address which is an ipv6 ( !!! ) address
165926 : Current IP '<current IPv6>' detected on network 'wan6'
165926 : Update needed - L: '<long IPv6>' <> R: 'invalid'
# will going to use the current WAN address which is ipv6 ( !!! ), see bind-address parameter
165926 : Force communication via IP '<current IPv6>'
165926 : #> /usr/bin/wget --hsts-file=/tmp/.wget-hsts -nv -t 1 -O /var/run/ddns/DuckDNS_ipv6.dat -o /var/run/ddns/DuckDNS_ipv6.err --bind-address=<current IPv6> --ca-directory=/etc/ssl/certs --no-proxy 'https://www.duckdns.org/update?domains=<username>.duckdns.org&token=***PW***&ipv6=<long IPv6>'
# and because the aforementioned problem, i.e. duckns.org cannot be access via ipv6 address script fails
165926 ERROR : GNU Wget Error: '4'
165926 : failed: Address family not supported by protocol.
failed: Address family not supported by protocol.
failed: Address family not supported by protocol.
165926 WARN : Transfer failed - retry 1/0 in 60 seconds