Skip to main content
ertius.org

Setting up a tunnelbroker.net IPv6 tunnel on Debian

Things you need to find out first

The IP address you plan to use the tunnel from (e.g. your current IP, or the IP of the server you want to set this up on) - $yourip.

Getting a tunnelbroker account

  1. Hit the registration page and sign up.
  2. Wait for the confirmation email, then login.
  3. From the (left-hand-side) “User Functions” menu click “Create Regular Tunnel”.
  4. Enter the IP you want to use the tunnel from
  5. Pick a host near the machine with that IP - the closer it is, the shorter the path your IPv6 packets will have to take to hit the IPv6 Internet.

Configure your machine to use the tunnel

Pick a name for the tunnel - it is just used as the interface name on Linux. Let’s say sit1. Now click on the your new tunnel, and you’ll be on the “Tunnel details” page.

Open up /etc/network/interfaces:

auto sit1
iface sit1 inet6 v4tunnel
    address $address
    netmask 64
    local $yourip
    endpoint $endpoint
    up ip route add 2000::0/3 via $theirip dev sit1

Where:

$address is the value of "Client IPv6 address".

$yourip is the local IP(v4) address.

$endpoint is the value of "Server IPv4 address".

$theirip is the value of “Server IPv6 address”, with the /64 removed

Test it

Ping

Make sure iputils-ping is installed (sudo aptitude install iputils-ping, if it isn’t), then try ping6 www.kame.net in a terminal:

PING www.kame.net(orange.kame.net) 56 data bytes
64 bytes from orange.kame.net: icmp_seq=1 ttl=54 time=126 ms

Web

If you are setting this up on your desktop, visit Kame using your browser. If this is on a server, use ssh -D1027 yourserver (via ipv4, of course) on your local machine to create a SOCKS proxy, tell your browser to use localhost:1027 as a SOCKS proxy, then visit Kame in your browser. If the tortoise is dancing, you’re done.