World IPv6 Day and how to connect FreeBSD through a Teredo Tunnel

Posted by: gdelmatto  :  Category: FreeBSD, IPv6, Networking

It has finally arrived, the World IPv6 Day!

So you don’t have native IPv6 network access? No problem, just use a Teredo Tunnel to get connected.
Here’s a very short primer on doing so on FreeBSD.

Firstly install the miredo package from the ports tree.

[root@GPWS ~]# cd /usr/ports/net/miredo/
[root@GPWS /usr/ports/net/miredo]# make clean install

Alternatively, install the binary package:

[root@GPWS ~]# pkg_add -r miredo

Enable miredo in your rc.conf:

[root@GPWS ~]# echo miredo_enable=YES >> /etc/rc.conf

Make sure to have a proper /usr/local/etc/miredo.conf.
Here’s my very minimalistic config:

#! /usr/local/sbin/miredo -f -c
RelayType client
InterfaceName teredo
#BindPort 3545

Note: Depending on your setup, e.g. with multiple interfaces, you may need to specify a BindAddress to use the proper network interface.
So to speak, you may need to specify also a specific port for some NAT setups.

Now fire up miredo:

[root@GPWS ~]# /usr/local/etc/rc.d/miredo start

You should end up with a new network interface by the name of ‘teredo’:

[root@GPWS ~]# ifconfig teredo
teredo: flags=43 metric 0 mtu 1500
inet6 fe80::ffff:ffff:ffff%teredo prefixlen 64 scopeid 0xb
inet6 2001:0:5ef5:79fb:4e9:5e1b:2ba5:360b prefixlen 128
nd6 options=3
Opened by PID 93528

You should now be able to ping6 any IPv6-enabled host on the internet.

[root@GPWS ~]# ping6
PING6(56=40+8+8 bytes) 2001:0:5ef5:79fb:4e9:5e1b:2ba5:360b --> 2a00:1450:8001::93
16 bytes from 2a00:1450:8001::93, icmp_seq=0 hlim=57 time=90.062 ms
16 bytes from 2a00:1450:8001::93, icmp_seq=1 hlim=57 time=18.996 ms
16 bytes from 2a00:1450:8001::93, icmp_seq=2 hlim=57 time=18.810 ms
--- ping6 statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/std-dev = 18.810/42.623/90.062/33.545 ms

Happy surfing!

Comments are closed.