another quick reminder to my future self, when I’m about to create a new hetzner cloud server and my ipv6 wireguard connection doesn’t work with vpn solutions such as algo

change the ipv6 interface /etc/network/interfaces.d/50-cloud-init.cfg from eth0:0 to eth0, like this:

root@wg: cat /etc/network/interfaces.d/50-cloud-init.cfg
# This file is generated from information provided by
# the datasource.  Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
    dns-nameservers 213.133.99.99 213.133.100.100 213.133.98.98

auto eth0
iface eth0 inet6 static
    address 2a01:4f8:c2c:beef::1/64
    gateway fe80::1
    post-up route add -net :: netmask 0 gw fe80::1%eth0 || true
    pre-down route del -net :: netmask 0 gw fe80::1%eth0 || true

this way, algo and wireguard recognize the correct networking interface to use ipv6 properly.