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
1 2 3 4 5 6 7 8 9 10 11 12 |
# 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
1 2 3 |
# vzctl stop VEID # vzctl set VEID --ipadd 2a02:7900:1:1002::2:100 --save # vzctl start VEID |
Install radvd for announcing your IPv6 range
1 |
# 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.
1 2 3 4 5 6 7 8 9 10 |
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# 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
Hello, I was wondering if you had tried the recently released 3.1 version, and if this problem still exists?
Hi Andrew,
What problem do you have? I’m testing it at V3, didn’t tried at V3.1
I posted my problem on the support forum here http://forum.proxmox.com/threads/16582-bond-bridge-not-routing-ipv6-correctly but no one has responded to me yet.
Basically, I don’t know what I am doing to configure ipv6 through my bridge+bond config. I tried using parts of your tutorial, but whenever I went to ifup/down my network interfaces, it would say things like vmbr1 cannot be found/configured (I dont remember the exact error, I am not at home right now.
Do you have routed /64 to the dedicated server? If not, maybe that’s the problem.
And also, the vmbr0 interface is using the IPv4 of the dedi, not local/private ip.
Yes, I tunnel my ipv6 through hurricane electric on my pfsense router. that works as a dhcpv6 server that manages my addresses. I actually had everything working perfectly, but then I decided to switch from vmware esx to proxmox, because I wanted free live vm migration.
What do you mean by vmbr0 using the dedicated ip? do you mean the ip of vmbr1 (10.1.1.8)
Yes, have you tried to use the dedicated ip address?
hello i have problem Add an IPv6 to in my container, the console generated this error:
Warning: distribution not specified in CT config, using defaults from /etc/vz/dists/default
WARNING: /etc/pve/openvz/103.conf not found: No such file or directory
Unable to move /etc/pve/openvz/103.conf.tmp -> /etc/pve/openvz/103.conf: File exists
Hi Andrés,
From the error code, it seems like you already have a config for container 103, or posibility of unable to make a container from an OS Lists.
Which version of Proxmox are you using?