HOWTO Configure a Hurricane Electric/Tunnelbroker.net IPv6 tunnel with Fedora/CentOS


First thing's first, go to tunnelbroker.net and register for an account. Once you're registered, click the Create Regular Tunnel from the navigation. Enter your public IP address (look at the home page to see yours) and select the closest location for your tunnel to connect to. Once your tunnel has been created you'll be given the following information: You'll also be routed a /64 which will allow your computer to route IPv6 addresses to your network.

Hurricane Electric has a great copy/paste from the Example configurations to get up and running right away, you can dump those into your /etc/rc.local file but if you want to use the init scripts included in your operating system, continue below...
The config files

Now that we have been assigned our tunnel, it's just a matter of editing the config files on our machine to get it to connect to the tunnel automatically.

In /etc/sysconfig/network add the following options:
NETWORKING_IPV6=yes
IPV6_DEFAULTGW=<Server IPv6 Address (omit the /64)>

Create /etc/sysconfig/network-scripts/ifcfg-sit1 with the following options:
DEVICE=sit1
BOOTPROTO=none
ONBOOT=yes
IPV6INIT=yes
IPV6TUNNELIPV4=<Server IPv4 Address>
IPV6TUNNELIPV4LOCAL=<Client IPv4 Address*>
IPV6ADDR=<Client IPv4 Address (keep the /64)>

* if your computer is NATted, this would not be the public IP, this would be the private IP that your computer has on it's interface instead.

To bring up your changes, restart the networking:
service network restart