Ipv6 Tunnel on OpenVZ VPS

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 Ubuntu 12.04 LTS.

  1. Create a tunnel at tunnelbroker.net
    Hurricane Electric allows creation of up to 5 free IPv6 tunnels @ tunnelbroker.net.
    Create one for your VPS.
  2. 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.
  3. 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.

  4. Create a new init script

    and 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.

    Make it executable, and add it to startup –

  5. Execute it right away –

    OR simply reboot.

    Test to confirm that IPv6 connectivity is working



Leave a Reply