Hassio: Network interface has no IPv6

Hey there,

first: I have to admit that I never dealt with any IPv6 topics by now, so my knowledge might lack a bit for how exactly IPv6 works. I had to look into this now, as I wanted to open my HA to the outside world behind a dyn DNS service and apparently, my ISP only assigns me an IPv6, no IPv4, so I started to just get the whole thing working with IPv6 only to make my life easier :slight_smile:

The actual issue:
I’m using the DuckDNS HA addon to have it update my IP. Unfortunately, it never worked, it always said “KO” as response. After digging a bit what this addon actually does, I found the cause why it’s not working:
In my DuckDNS addon config I have this line: ipv6: 'https://api6.ipify.org/' which should fetch the IPv6 address and update DuckDNS (https://github.com/home-assistant/hassio-addons/blob/a5bd90451c8c4205590f6a77748181e89c3403c2/duckdns/data/run.sh#L57). So I checked what this actually results in when running on the RPi / Hassio: It returns an IPv4! O_o
I tried it in my browser (just to verify this website works) and I see an IPv6.
So the issue must be somewhere else.

I tried checking the IP addresses of the eth0 interface and actually, it doesn’t have any. Only an IPv4 address. I tried a simple ifconfig and also /sbin/ip -6 addr show dev eth0, but none list any IPv6.

But: I can perfectly reach my HA using just IPv6: It’s configured to only listen on IPv6 and I’m only accessing it via it’s IPv6 address / the mDNS translates only to its IPv6.
How on earth does that work? :smiley:

Is it that only the host has an IPv6 and maps it to IPv4 inside the docker container!? I’m lost :slight_smile:

I then also tried to add a simple CONFIG/network/my-network on the SD card / host (before I just had none, because I was just using the defaults, which was ethernet and IPv4), but even that doesn’t change anything.
That’s the my-network file:

[connection]
id=my-network
uuid=b2416a37-66b0-4335-b854-6d5ba68458fc
type=802-3-ethernet

[ipv4]
method=auto

[ipv6]
addr-gen-mode=eui64
method=auto

What is this witchcraft? :smiley: Can somebody help me how my RPi/Hassio interfaces get an IPv6, so a curl to https://api6.ipify.org/ actually returns an IPv6 so my DuckDNS addon actually can update the IPv6? :slight_smile:

Thanks and greetings,

Andy!