Configure IPv6

© 2026 Gregory D. Weber

Activities of January 6, 2025. Published March 23, 2026.

I get IPv6 configured correctly and add a DNS record for it.

Configure IPv6

IPv6 seems not to be working. Hetzner’s cloud servers get their IPv4 address from DHCP, but the IPv6 address needs to be configured statically. I edit /etc/rc.conf as directed by Hetzner’s instruction Static IP configuration. I interpret their example line

ifconfig_vtnet0_ipv6="inet6 <one IPv6 address from your subnet, e.g. 2a01:4f8:0::1>/64"

as meaning, probably, something like this:

ifconfig_vtnet0_ipv6="inet6 2a01:4ff:f0:da52::/64"

This is wrong, but if it’s what I did, it worked. (I can’t remember exactly what I put in /etc/rc.conf, and I don’t have any completely clear and indubitable record of it.) See the correction below.

I then tried to restart network with this command:

# service netif restart && service routing restart

which seemed to work at the Hetzner console, but then I couldn’t ssh or ping the host, even in IPv4, so I rebooted and now it is working with IPv4 and IPv6.

Add DNS record for IPv6

I then went over to Porkbun and set up an AAAA DNS record for the IPv6 address. The current records are now:

Type Host        Answer             TTL
A    gdweber.org 5.161.46.252       600 
AAAA gdweber.org 2a01:4ff:f0:da52:: 600

I tested this with ping6 and ssh -6; everything works.

Correction

Being really unsure of what I am doing, I open a ticket with Hetzner to ask about the IPv6 configuration. I attach my /etc/rc.conf. Almost immediately I get an automated response—which begins:

Guten Tag,

Ihre Nachricht ist bei uns eingetroffen. Schön, dass Sie uns kontaktieren.

I read this carefully, thankful that my long unexercised high school German is still good enough for me to understand most of it. It’s just telling me my report has been received.

Then I scroll down and see the English translation.

Two days later, Hetzner informs me, in English: “2a01:4ff:f0:da52::/64 is not an IPv6 address but rather a IPv6 Subnet. The first address in this subnet would be 2a01:4ff:f0:da52::1”

So does that mean I get to use all/any of the addresses in that subnet? It seems to be working the way I have done it, though.

But it is a mistake, so I am changing the line in /etc/rc.conf to

ifconfig_vtnet0_ipv6="inet6 2a01:4ff:f0:da52::1"

And of course, I also change the DNS record to

Type Host        Answer              TTL
AAAA gdweber.org 2a01:4ff:f0:da52::1 600

A whole subnet

If they are assigning me the subnet 2a01:4ff:f0:da52::/64, then it looks like I could use any IPv6 addresses in the range 2a01:4ff:f0:da52::1 to 2a01:4ff:f0:da52:ffff:ffff:ffff:ffff. I ask them to confirm that. They answer that I can use any one of the IPv6 addresses in the subnet—but only one.

I wonder why they assign me a whole subnet, but I don’t ask.

References