wlanboy

tutorials and ruby scripts

Read my tutorials

Read my gists

Tutorial

Tutorial: ipv6

There are a lot of good offers on the LEB market but some providers do not want to support IPv6. Some providers want to support it but their datacenter do not care.

This little tutorial is for customers wanting to play around with IPv6 even if their provider tells them “IPv6 will be available in two weeks”.

  1. Open this page: http://www.tunnelbroker.net/

  2. Create an account

  3. Create Regular Tunnel: http://www.tunnelbro…/new_tunnel.php

  4. Type in the public ip of your vps (IPv4 Endpoint)

  5. Select one of the tunnel severs:
    createtunnel.JPG

  6. Create tunnel

  7. Open the config tab:
    nbr72t.jpg

  8. Copy&paste the text to /etc/network/intefaces

  9. Run following commands as root:

    sysctl net.ipv6.conf.all.forwarding=1
    nano /etc/sysctl.conf
    uncomment line #net.ipv6.conf.all.forwarding=1
    ifup he-ipv6
    
  10. Test your IPv6 connection:

<pre class="prettyprint">ping6 ipv6.google.com

</pre>
  1. If you want you can add an additional /48 block too:
    additional48.JPG

  2. Use this tunnel in FreeBSD

They are providing the setup for FreeBSD but only the shell commands - no rc.conf.  

So let's take a look at the commands:  

<pre class="prettyprint">ifconfig gif0 create
ifconfig gif0 tunnel ipOfYourVPS ipOfTunnelBroker
ifconfig gif0 inet6 ipv6OfYourVPS ipv6OfTheTunnelBroker prefixlen 128
route -n add -inet6 default ipv6OfTheTunnelBroker 
ifconfig gif0 up
</pre>

rc.conf would look like this:

<pre class="prettyprint">ipv6_enable="YES"
gif_interfaces="gif0"
gifconfig_gif0="ipOfYourVPS ipOfTunnelBroker"
ipv6_ifconfig_gif0="ipv6OfYourVPS ipv6OfTheTunnelBroker prefixlen 128"
ipv6_defaultrouter="ipv6OfTheTunnelBroker"
ipv6_gateway_enable="YES"
ipv6_ifconfig_gif0_alias0="2001:**:*:*::22 prefixlen 64"
ipv6_ifconfig_gif0_alias1="2001:**:*:*::33 prefixlen 64"
</pre>