I have purchased a VPS from IONOS. While they provide an IPv6 range 2a00:xxxx:xxxx:67::/64
, they don't route it to the VPS itself, which is quite odd.
I wonder how I can achieve that. I have only 254 clients, so I'm happy to do it manually. This is what I already see in the route table:
ip -6 route
::1 dev lo proto kernel metric 256 pref medium
2a00:xxxx:xxxx:67:ffff::1 dev wg0 metric 1024 pref medium
2a00:xxxx:xxxx:67:ffff::2 dev wg0 metric 1024 pref medium
... all way to 254
2a00:xxxx:xxxx:67:ffff::254 dev wg0 metric 1024 pref medium
2a00:xxxx:xxxx:67::/64 dev ens192 proto kernel metric 256 pref medium
fd8e:xxxx:xxxx::/112 dev wg0 proto kernel metric 256 pref medium
fe80::/64 dev ens192 proto kernel metric 256 pref medium
default via fe80::1 dev ens192 metric 1024 onlink pref medium
So do I need to assign the client IPs separately to the ens192
to make this work? I have made a small bash script for this:
#!/bin/sh
NUMBER_CLIENTS=254
for ((DOT_IP=1; DOT_IP<=NUMBER_CLIENTS; DOT_IP++))
do
sudo ip -6 addr add 2a00:xxxx:xxxx:67:ffff::${DOT_IP}/64 dev ens192
done
The script works, but my Wireguard VPN clients still don't get a functioning IPv6. After successfully connecting with Wireguard, they have only an IPv4 assigned and not an IPv6.
What else could I do please?
Based on their guide, they seem to be suggesting to use accept_ra 0
in the static IP allocation. But I didn't set it:
auto lo ens192
iface lo inet loopback
allow-hotplug ens192
iface ens192 inet dhcp
iface ens192 inet6 static
address 2a00:xxxx:xxxx:67::1
netmask 64
gateway fe80::1
Other than that I have forwarding enabled in /etc/sysctl.d/99-sysctl.conf
:
net.ipv4.ip_forward = 1
net.ipv6.conf.all.forwarding = 1
Many Thanks