hassio-addons / repository

Home Assistant Community Add-ons
https://addons.community
MIT License
1.16k stars 504 forks source link

No IPv6 support in Addons/Containers without host networking #618

Closed benniju closed 1 month ago

benniju commented 2 months ago

Problem/Motivation

I wan't to use IPv6 networing in some of the Addons, in this case uptime-kuma to monitor and ping an host which only has an AAAA (IPv6) record and only IPv6 Address, for example ipv6.google.com

Expected behavior

I expect the ping to work and not to give an error.

Actual behavior

The ping fails with the error ping: connect: Address not available

This is the output when I try to use ping in the docker container using docker exec:

root@a0d7b954-uptime-kuma:/opt$ ping google.de
PING google.de (142.250.186.35) 56(84) bytes of data.
64 bytes from fra24s04-in-f3.1e100.net (142.250.186.35): icmp_seq=1 ttl=114 time=19.9 ms
^C
--- google.de ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 19.858/19.858/19.858/0.000 ms
root@a0d7b954-uptime-kuma:/opt$ ping -6 google.de
ping: connect: Address not available
root@a0d7b954-uptime-kuma:/opt$ ping6 google.de
ping6: connect: Address not available

See this issue discussion for some additional information: https://github.com/louislam/uptime-kuma/issues/3113#issuecomment-2133211835

Steps to reproduce

Add a Ping monitor in Uptime Kuma with the hostname ipv6.google.com

Proposed changes

Add IPv6 support for the default Home Assistant docker network.

The problem does not occur when creating the addon locally and adding host_network: true to config.yaml But this is not a real solution, as it decreases the security rating and you can not change the port easily anymore then.

CommanderStorm commented 2 months ago

Don't know anything about HA, but have you enabled ipv6 networking in docker (docs at https://docs.docker.com/config/daemon/ipv6/)?

benniju commented 2 months ago

Hmm, I'm not really comfortable with modifying the defalt setup, as this is usually quite locked up and not supposed to be changed.

I have found another thread about IPv6 Support though: https://community.home-assistant.io/t/ipv6-only-with-home-assistant-os/688811 There also seems to be some work on this, but not any progress currently. But you can enable IPv6 by following this tutorial apparently: https://github.com/home-assistant/supervisor/issues/2133#issuecomment-1950722961

frenck commented 1 month ago

Thanks for your issue report, however, it is in an incorrect location.

This is the issue tracker for the community add-ons repository index; your issue/feature request is however meant for the Home Assistant project. Please report it with that project instead.

../Frenck