With choosing the tools, one of my arguments to choose a specific type was because it supported IPv6.
This was because of two reasons. My opinion all network related stuff should have IPv6 support these days, and secondly i want to use IPv6 !
You might wonder why ... well ... why did i build my own software anyway ? Just because it's new, and it's fun (I hope :-) )
To get IPv6 connectivity to the internet, i have to use a IPv6-in-IPv4 tunnel, of a sit tunnel as linux calls it.
A part you might forget here, is to open your IPv4 firewall, to accept IPv6 packets on top of them.
I used somthing like this:
iptables -I INPUT 1 -s [ISP Tunnelbroker IPv4 address] -p ipv6 -j ACCEPT
This will accept all IPv6 traffic encapsulated in IPv4 coming from your ISP.
Next thing will turning on the sit0 interface, and adding your IPv6 tunnel endpoint address to it. I did it like this:
ifconfig sit0 up
ifconfig sit0 inet6 add [Your IPv6 tunnel endpoint address]
Now, last but not least, you should setup routing in a way that it routes everything to the IPv4 tunnel endpoint of your ISP. I used this:
route -A inet6 add [ISP IPv6 Tunnel endpoint] gw ::[ISP IPv4 tunnel endpoint address]
route -A inet6 add ::/1 gw ::[ISP IPv4 tunnel endpoint address]
route -A inet6 add 8000::/1 gw ::[ISP IPv4 tunnel endpoint address]
A few things might seem strange. First of all, in the last field of every line, i mean you should enter the IPv4 address with two semicolons in front of them. They call that a IPv6 mapped IPv4 address.
You also might wonder what the last two routes are. If you convert them to binary, you will see the only difference between them is that the first bit is set or not. So with the two routes, i actualy make the same as a normal default gateway. You could also you the default gateway, but, and that why i do this, if you turn on routing on the box, it will refuse to use the default gateway for routing. With this you have the same result with two routes.
Now you should have a IPv6 range that you've got from your provider. Now just assign all your computers a address from that range, and you can use their default gateways, and set it to the IPv6 address you assign to the ethernet interface of the router.
Now turn on routing for IPv6 with:
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
Now enjoy your IPv6 link !