End 2013 I published an article explaining how easily a “IPv6 Box” under Debian, that is, a server that provides access to IPv6 to all machines on your network, using two things: a tunnel that encapsulates IPv6 in the IPv4 (allowing you to enjoy while your ISP does not offer) and radvd a daemon that is your gateway to the rest of the network (devices generate themselves a complete IPv6 by the) Suite).
With this new article, here’s how to make the same thing on FreeBSD!
For the theory and presentation of the operating mode, I redirects you to the article to be an IPv6 Box in which there are schemas and everything that goes with. What you need is:
A tunnel at Hurricane Electric in 48
A server FreeBSD of course, connected to the same LAN as the machines that you want to serve
Mounting of the tunnel
Add the /etc/rc.conf.local:
#IPV6 HE tunnel
ipv6_gateway_enable = “YES”
ipv6_interfaces = “auto”
ipv6_activate_all_interfaces = “YES”
ipv6_cpe_wanif = “gif0”
ifconfig_re0_ipv6 = “inet6 2001:470:c851:192:1 prefixlen 64”
cloned_interfaces = “gif0”
ifconfig_gif0 = “192.168.0.10 tunnel 220.127.116.11”
ifconfig_gif0_ipv6 = “inet6 2001:470:c851:10:1 2001:470:c851:1 prefixlen 128”
ipv6_defaultrouter = “2001:470:c851:1”
rtadvd_enable = “YES”
rtadvd_interfaces = “re0”
Replace by the elements available to you:
ifconfig_re0_ipv6: IPv6 address that you give to your LAN interface (attention your interface is not called necessarily re0)
ifconfig_gif0: address of the LAN and server at HE (Server IPv4 Address) address
ifconfig_gif0_ipv6: IPv6 address that you give to the gif0 and address of the server in HE (Server IPv6 Address)
ipv6_default_router: address of the server in HE (Server IPv6 Address)
Then restart your system (the netif command does not rise the IPv6 tunnels).
Rtadvd(8) will make router advertisement is to say that he is going to announce its presence on the LAN to other machines. Your devices will be able to generate an IPv6 address from the prefix they have. So create and edit the /etc/rtadvd.conf file:
: addrs #1:addr = “2001:470:c851:192:”: prefixlen #64:tc = ether:
As you guessed this file contains the prefix of the LAN.
Make sure to start rtadvd(8):
# service rtadvd(8) start
On another machine of your LAN, reconnect the network. You should now see that you retrieve an IPv6:
Vous pouvez aussi utiliser le site test-ipv6.com
Note : J’ai masqué mon IPv6 en rouge sur la capture, par contre j’ai laissé tout ce qui est IPv4, car soit c’est du LAN, soit c’est l’adresse IP de maniatux que tout le monde peut déjà voir 😉