My ISP recently started providing IPv6. I have a Raspi with PiVPN at home and like to be able to reach my LAN when I am away. I have been using DuckDNS for years now and for IPv4 it worked great. However, because they are on AWS, it seems they are unable to resolve IPv6, so you have to provide it yourself to their update API. This API usually returns OK if everything was fine and KO if there was an issue.
This is the code I am using to update:
token='mytoken'
domain='mydomain'
ipv6=$(ip addr show dev "eth0" | sed -e's/^.*inet6 \([^ ]*\)\/.*$/\1/;t;d' | grep -v '^fd00' | grep -v '^fe80' | head -1)
echo url="https://www.duckdns.org/update?domains=$domain&token=$token&ip=&ip6v=$ipv6&clear=true&verbose=true" | curl -k -o ~/duckdns/duckdns.log -K -
I compared my "local" ipv6 and one I get from curling another server as described here, but there seems to be no difference so I am pretty sure I correctly get my IPv6.
It returns an OK but then says that I provided an invalid IP when I try to check it on the website.
Any ideas on how to add IPv6 to a duckdns domain?