Major Hayden has a wonderful blogpost about using Fedora CoreOS at my favourite cloud service provider, Hetzner Cloud. However, a machine deployed this way doesn’t have a working IPv6 connection. Since Fedora CoreOS ships with Network Manager, it’s easy to fix this with just a few
First, you need to find out which subnet you have been assigned. If you are using the
hcloud CLI, just run:
$ hcloud server ip -6 <YOUR SERVER NAME> 2a01:4f8:c17:a049::1
The command actually gives you the first address of the subnet, which has a prefix of
/64. So the subnet assigned to your instance is
2a01:4f8:c17:a049::/64. If you are not using the CLI client, you can find the subnet in the instance’s overview.
Now, you need to decide which address from the subnet you actually want to use for the server. Conveniently, you can use the first one (which is actually the output from the
hcloud command above), so we will use
2a01:4f8:c17:a049::1 for this example.
It’s time to change the network configuration on the server! Run the following commands as root. I assume that your connection is called
Wired connection 1 which is the default name for Fedora CoreOS.
nmcli connection modify 'Wired connection 1' ipv6.addresses <The address from the previous step> # For this example, it's 2a01:4f8:c17:a049::1 nmcli connection modify 'Wired connection 1' ipv6.method manual nmcli connection modify 'Wired connection 1' ipv6.gateway fe80::1 nmcli connection modify 'Wired connection 1' ipv6.dns 2a01:4ff:ff00::add:1,2a01:4ff:ff00::add:2 nmcli connection up 'Wired connection 1'
Let’s take a closer look at these commands:
- The first one adds the IP address from the subnet that Hetzner gives us
ipv6.method manualdisables any attempts by Network Manager to autoconfigure the global address (using RA or DHCPv6)
ipv6.gateway fe80::1sets the address of the default gateway, this value is taken from Hetzer’s docs
ipv6.dnsconfigures the DNS servers for IPv6, again taken from the docs
- Finally, the last command reloads the configuration.
From now on, your server should be fully IPv6 enabled! You can now try to access IPv6-only websites from the server:
curl -6 ipv6.google.com
and connect to the server’s SSH server from another location:
ssh <YOUR USER>@2a01:4f8:c17:a049::1
And that’s it! Note that I’m still an IPv6 beginner, so if you find any mistakes, ping me at @email@example.com.