Need help with IPv6, it's not working in VMs

Lunar

Active Member
Sep 24, 2016
22
0
41
I really need someone to help me with IPv6. I can't figure it out and I've been on and off trying to troubleshoot it for a month with no success. I have a Hetzner server and IPv4 in VMs work fine. I can't for the life of me get IPv6 working. I'll post some configs to troubleshoot.

/etc/network/interfaces

Code:
auto lo
iface lo inet loopback
iface lo inet6 loopback

auto eth0
iface eth0 inet static
	address  5.x.x.44
	netmask  255.255.255.255
	gateway  5.x.x.33
	pointopoint 5.x.x.33

iface eth0 inet6 static
	address  2a01:x:x:x::2
	netmask  128
	gateway  fe80::1

auto vmbr0
iface vmbr0 inet static
	address  5.x.x.44
	netmask  255.255.255.255
	bridge_ports none
	bridge_stp off
	bridge_fd 0
	up ip route add 144.x.x.248/32 dev vmbr0
	up ip route add 144.x.x.249/32 dev vmbr0
	up ip route add 144.x.x.250/32 dev vmbr0
	up ip route add 144.x.x.251/32 dev vmbr0
	up ip route add 144.x.x.252/32 dev vmbr0
	up ip route add 144.x.x.253/32 dev vmbr0
	up id route add 144.x.x.254/32 dev vmbr0
	up ip route add 144.x.x.255/32 dev vmbr0

iface vmbr0 inet6 static
	address  2a01:x:x:x::2
	netmask  64

auto vmbr1
iface vmbr1 inet static
	address  10.10.10.1
	netmask  255.255.255.0
	bridge_ports none
	bridge_stp off
	bridge_fd 0
	post-up iptables -t nat -A POSTROUTING -s '10.10.10.0/24' -o eth0 -j MASQUERADE
	post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o eth0 -j MASQUERADE

VM's /etc/network/interfaces

Code:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
  address 144.x.x.249
  netmask 255.255.255.255
  gateway 5.x.x.44
  pointopoint 5.x.x.44

iface eth0 inet6 static
  address 2a01:x:x:x::1111
  netmask 64
  gateway 2a01:x:x:x::2

What's in /etc/sysctl.conf

Code:
net.ipv4.ip_forward=1
net.ipv6.conf.all.forwarding=1
net.ipv4.conf.all.send_redirects = 0

Something concerning I noticed in the VM:

ip -6 neigh gives this output.

Code:
2a01:x:x:x::2 dev eth0  FAILED
 
Hey,

even it´s an older post: Did you bring this to work? I have the same problem.
 
It is simple:

eth0: use one IPv6 of your pool
vmbr0: use the same IPv6 of your pool

In your vmbr0-VM use the IP above as router and enable IPv6 routing.
 
You also do not need the entries

Code:
up ip route add 144.x.x.248/32 dev vmbr0

Just use your machine as router for everyting. Hetzner already routes all the traffic to your additional subnets to your machine, so you just do the same. The aforementioned method also works for IPv4.

I did it like this:

eth0: IPv4 of the server and IPv6 of the server like it was on the bare metal provision
vmbr0: First IPv4 of my IPv4 subnet with correct subnet, first IPv6 of my IPv6 subnet

Use vmbr0 IPs as router for the VMs attached to vmbr0
 
I was having the same problem, when I realized that eth0 and vmbr0 need to have distinct subnets.

I solved it by splitting my server's /64 subnet into multiple /96 ones, giving one to eth0 and another to vmbr0. Now I have:
Code:
host eth0  = address $PREFIX::2    netmask 96 gateway fe80::1
host vmbr0 = address $PREFIX:1::2  netmask 96
CTs  eth0  = address $PREFIX:1::NN netmask 96 gateway $PREFIX:1::2
Everything seems to be working so far.

Is this correct?
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!