Adminor provides native IPv6, but if you’d like to setup an IPv6 tunnel you can still do so.
Crossposted from http://www.cybermilitia.net/2013/07/22/ipv6-tunnel-on-openvz/
You can get IPv6 connectivity using a tunnel, if you don’t have native IPv6 support.
Doing this is pretty straightforward if you have a dedicated server or a KVM VPS.
However, with an OpenVZ VPS, things are a little different.
Here’s how you can get IPv6 working on a OpenVZ VPS with a tunnel – Tutorial for Debian (tested on wheezy).
- Create a tunnel at tunnelbroker.net
Hurricane Electric allows creation of up to 5 free IPv6 tunnels @ tunnelbroker.net.
Create one for your VPS. - Enable TUN/TAP on your VPS.
It should normally be possible to do this through your control panel (e.g., SolusVM).
If not, a support ticket with your provider should get it done fairly quickly.
Be advised that toggling this option forces a reboot. So plan accordingly. - tb-tun
tb-tun is a userspace program that utilizes TUN/TAP to build a tunnelbroker tunnel on linux.
Since we can’t do it any other way on a OpenVZ VPS.apt-getinstalliproute gcccd/rootwget http://tb-tun.googlecode.com/files/tb-tun_r18.tar.gztar-xf tb-tun_r18.tar.gzgcc tb_userspace.c -l pthread -o tb_userspace - Create a new init script
nano/etc/init.d/ipv6tband put in the following contents (after replacing the correct IP addresses, of course)
Remember, for the tunnel, your VPS IP is the client and the Hurricane Electric IP is the server.#! /bin/sh### BEGIN INIT INFO# Provides: ipv6# Required-Start: $local_fs $all# Required-Stop: $local_fs $network# Default-Start: 2 3 4 5# Default-Stop: 0 1 6# Short-Description: starts the ipv6 tunnel# Description: ipv6 tunnel start-stop-daemon### END INIT INFO# /etc/init.d/ipv6tbtouch/var/lock/ipv6tbcase"$1"instart)echo"Starting ipv6tb "setsid/root/tb_userspacetb [Server IPv4 Address] [Client IPv4 Address] sit >/dev/null2>&1 &sleep3s#ugly, but doesn't seem to work at startup otherwiseifconfigtb upifconfigtb inet6 add [Client IPv6 Address]/64ifconfigtb inet6 add [Routed/64]::1/64#Add as many of these as you need from your routed /64 allocationifconfigtb mtu 1480route -A inet6 add ::/0dev tbroute -A inet6 del ::/0dev venet0;;stop)echo"Stopping ipv6tb"ifconfigtb downroute -A inet6 del ::/0dev tbkillall tb_userspace;;*)echo"Usage: /etc/init.d/ipv6tb {start|stop}"exit1;;esacexit0Make it executable, and add it to startup –
chmod0755/etc/init.d/ipv6tbupdate-rc.d ipv6tb defaults - Execute it right away –
/etc/init.d/ipv6tbstartOR simply reboot.
Test to confirm that IPv6 connectivity is working
ping6 -c 5 google.com