depenguin-me/depenguin-builder

Do the default DHCP network settings work with Hetzner ipv6 only hosts?

bretton opened this issue · 7 comments

The default network settings on boot have the following in /etc/rc.conf

ifconfig_DEFAULT="DHCP"

Is this sufficient to get an IPv6 address, or is some other option required?

https://docs.hetzner.com/cloud/servers/static-configuration/ lists for freeBSD on their cloud offering

ifconfig_vtnet0="DHCP"
ifconfig_vtnet0_ipv6="inet6 <one IPv6 address from your subnet, e.g. 2001:db8:0:3df1::1>/64"
ipv6_defaultrouter="fe80::1%vtnet0"

It looks like this might suffice, to be tested

ifconfig_DEFAULT="DHCP inet6 accept_rtadv"

And this might be useful https://www.daemonology.net/blog/2017-01-26-IPv6-on-FreeBSD-EC2.html

pkg install dual-dhclient

add to /etc/rc.conf

ifconfig_DEFAULT="SYNCDHCP accept_rtadv"
ipv6_activate_all_interfaces="YES"
dhclient_program="/usr/local/sbin/dual-dhclient"

Included, but commented out in 0514786efabf504f487a1a17117a5afdcd992674

This guide lists

# DMZ/External Interface Configuration
ifconfig_em0="SYNCDHCP"
ifconfig_em0_ipv6="inet6 accept_rtadv"

Not sure about their IPv6 setup (so far I always configured it manually). One way would be to place a isc-dhcpd or some other package in the image that can do proper DHCPv6 (if this is what Hetzner actually does).

In the absence of a better way, we have /root/enable_ipv6.sh now.