- Hetzner Dedicated Server → Virtual Machine (KVM) → LXD
- Single public IPv4 Address: 18.104.22.168
- Public IPv6 Block: 2a01:abcd:abcd:abcd::2/64
- Additional IPv4 Subnet: 22.214.171.124/29
My objective is to have each project in its own VM with LXD setup, each container will be allocated a public IPv6 address. Ideally each VM will have its own block
2a01:abcd:abcd:abcd::prefix:2 to prevent collisions, I guess.
Previously I was able to get IPv6 addresses with Macvlan, however I have since bought the additional IPv4 subnet and to set this up, I had to setup a bridge, and now MacVlan no longer works, I think.
Currently I get no internet in the containers, if I enable IPv6 on the lxd network.
If i go into the VM then i can ping LXC containers with private IPv6, but any other IPv6 address I cant.
me@project1~$ ping6 google.com ping6: connect: Network is unreachable
I have enabled forwarding so host can be used as a gateway.
$ vi /etc/sysctl.conf net.ipv4.ip_forward=1 net.ipv6.conf.all.forwarding=1
network: version: 2 renderer: networkd ethernets: enp41s0: dhcp4: no dhcp6: no bridges: br0: interfaces: - enp41s0 dhcp4: no dhcp6: no addresses: - 126.96.36.199/32 - 2a01:abcd:abcd:abcd::2/128 routes: - to: 0.0.0.0/0 via: 188.8.131.52 on-link: true - to: 184.108.40.206/29 scope: link - to: "::/0" via: "fe80::1" on-link: true nameservers: addresses: - 220.127.116.11 - 18.104.22.168 - 22.214.171.124 - 2a01:4f8:0:1::add:9898 - 2a01:4f8:0:1::add:1010 - 2a01:4f8:0:1::add:9999
network: version: 2 ethernets: enp1s0: addresses: - 126.96.36.199/29 - 2a01:abcd:abcd:abcd::111/128 gateway4: 188.8.131.52 gateway6: 2a01:abcd:abcd:abcd::2 nameservers: addresses: - 184.108.40.206 - 220.127.116.11 - 18.104.22.168 - 2a01:4f8:0:1::add:9898 - 2a01:4f8:0:1::add:1010 - 2a01:4f8:0:1::add:9999 routes: - to: 22.214.171.124/32 via: 0.0.0.0 scope: link - to: "2a01:abcd:abcd:abcd::2/128" via: "::/0" scope: link
It’s taken me days to get his far, but I need help. Thanks in advance.