First set up the IPv6 native for the router(mostly done by tunneling)
#MYIPv4=”188.8.131.52″ # My IPv4 address
#XSIPv4=”184.108.40.206″ # PoP’s IPv4 address
#MYIPv6=”3ffe:80ee:5f8::1″ # Choose any IPv6 address from the range
# you’ve got from XS26
ifconfig gif0 create tunnel 220.127.116.11 18.104.22.168 up
route add -inet6 default -interface gif0
ifconfig lo0 inet6 3ffe:80ee:5f8::1 prefixlen 128
Then we need to compile firewall support for IPv6 into the kernel, add these and rebuild kernel:
By default everything is disallowed so to allow everything(IMPORTENT: Just because almost nobody uses IPv6 you cant drop the security here, so you have to get back later to set up a prober firewall) type:
ip6fw add accept all from any to any
Then our local ipv6 is running, to share it we first have to make our local machines able to talk to each other trough ipv6, to do this the local interface have to have an ipv6 ip:
ifconfig rl0 inet6 3ffe:80ee:5f8::1 prefixlen 64
Note that this is the same ip as the machine has on the global interface, but here with 64 bit prefix instead meaning that the network 3ffe:80ee:5f8:: can be reached trough this interface.
Then enable routing by typing:
and now it should be running, this can be done automaticly by a dirty litle quick hack in you init scripts, or you can try to figure out how to do as much as posible of it from standard initscripts.
This works in a pure setup, if you mix it with other technologies you might encounter odd problems which requires newthinking.