TunnelBroker

The following is how to configure your Gentoo Network configuration to automatically set up Hurricane Electrics' TunnelBroker service. http://www.tunnelbroker.net/tunnel_detail.php

Setup
1. Obtain your settings from your TunnelBroker Page and add them to the /etc/conf.d/net.

2. Add network configuration for the he6 tunnel interface.

3. Make a new symlink for the tunnel interface

Test
1. Add ipv6 to your /etc/make.conf. Make sure that there is not -ipv6 keyword.

2. Rebuild iputils (contains ping, ping6, ..)

3. Ping google test server or other ipv6 service

Router
These sections are for those who want to share ipv6 connection on their LAN network.

Radvd
To allow other LAN clients to assign an ip address you have two options (stateless = autoconfiguration and statefull = ipv6 DHCP). Stateless is preferred and is simple to configure. You need radvd daemon and configure it for the assigned prefix from TunnelBroker. Make sure to enter the right interface - the one you want to allow the clients to autocofigure (not the interface to your ISP).

Packet forwarding
Add these lines to your /etc/sysctl.conf.

Single interface
If you want to use this machine as a ipv6 router for the rest of your ipv6-enabled LAN network and this machine has only one ethernet adapter (eth0), make sure to assign an ipv6 address and subnet to that interface!

The specified ipv6 address must have an assigned prefix from TunnelBroker.

If you want to assign this ip automatically, modify your /etc/conf.d/net:

Note: For some strange reason, ipv4 and ipv6 assign did not work for me using this syntax on baselayout 2:

I solved it by assigning ipv6 in the /etc/local.d/something script.