1 min read

Configuring IPv6 in Proxmox VE3

I’ve been googling for some articles and tutorials about IPv6 support in Proxmox VE3, but most of them didn’t explain it clearly, and some of them using language other than English, so, here is some fix for IPv6 inside Proxmox.
 
Configuring sysctl.conf

# nano /etc/sysctl.conf
...
net.ipv4.ip_forward = 1
net.ipv6.conf.eth0.autoconf = 0
net.ipv6.conf.eth0.accept_ra = 0
net.ipv6.conf.all.accept_redirects = 0
net.ipv6.conf.all.router_solicitations = 1
net.ipv6.conf.default.forwarding = 1
net.ipv6.conf.all.forwarding = 1
net.ipv6.conf.default.proxy_ndp = 1
net.ipv6.conf.all.proxy_ndp = 1
...

To apply the configuration, we can reboot the dedicated server or run # sysctl -p
For the IPv6, let’s assume that we got the following IPv6 allocation :

  •  Routed IPv6 : 2a02:7900:1:1002::2/64
  • Gateway : 2a02:7900:1:1002::1

 
Add an IPv6 to your OpenVZ container

# vzctl stop VEID
# vzctl set VEID --ipadd 2a02:7900:1:1002::2:100 --save
# vzctl start VEID

 
Install radvd for announcing your IPv6 range

# apt-get install radvd -y

 
Configure your /etc/radvd.conf, and we are using our whole IPv6 allocation here, so another IPv6 from our range will be announced.

interface vmbr0 {
AdvSendAdvert on;
MinRtrAdvInterval 3;
MaxRtrAdvInterval 10;
prefix 2a02:7900:1:1002::2/64 {
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr on;
};
};

 
Configure our /etc/network/interfaces to automatically load the routing when the dedicated server boot.

# nano /etc/network/interfaces
...
auto lo
iface lo inet loopback
auto vmbr0
iface vmbr0 inet static
	address 80.95.29.98
	netmask 255.255.255.248
	network 80.95.29.96
	broadcast 80.95.29.103
	gateway 80.95.29.97
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0
        bridge_maxwait 0
auto eth0
iface eth0 inet manual
iface vmbr0 inet6 static
	address 2a02:7900:1:1002::2
	netmask 64
	gateway 2a02:7900:1:1002::1
post-up ip -6 neigh add proxy 2a02:7900:1:1002::2:100 dev vmbr0
...

 
Now, we can login to the container or newly created OpenVZ VPS, and have a working IPv6 connection