Current Setup:
- Hetzner Dedicated Server → Virtual Machine (KVM) → LXD
- Single public IPv4 Address: 123.123.123.72
- Public IPv6 Block: 2a01:abcd:abcd:abcd::2/64
- Additional IPv4 Subnet: 222.222.222.104/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
Host /etc/netplan/01-netcfg.yaml
network:
version: 2
renderer: networkd
ethernets:
enp41s0:
dhcp4: no
dhcp6: no
bridges:
br0:
interfaces:
- enp41s0
dhcp4: no
dhcp6: no
addresses:
- 123.123.123.72/32
- 2a01:abcd:abcd:abcd::2/128
routes:
- to: 0.0.0.0/0
via: 123.123.123.65
on-link: true
- to: 222.222.222.104/29
scope: link
- to: "::/0"
via: "fe80::1"
on-link: true
nameservers:
addresses:
- 213.133.100.100
- 213.133.98.98
- 213.133.99.99
- 2a01:4f8:0:1::add:9898
- 2a01:4f8:0:1::add:1010
- 2a01:4f8:0:1::add:9999
Guest /etc/netplan/00-installer-config.yaml
network:
version: 2
ethernets:
enp1s0:
addresses:
- 222.222.222.111/29
- 2a01:abcd:abcd:abcd::111/128
gateway4: 123.123.123.72
gateway6: 2a01:abcd:abcd:abcd::2
nameservers:
addresses:
- 213.133.100.100
- 213.133.98.98
- 213.133.99.99
- 2a01:4f8:0:1::add:9898
- 2a01:4f8:0:1::add:1010
- 2a01:4f8:0:1::add:9999
routes:
- to: 123.123.123.72/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.