Miredo
From ARIN IPv6 Wiki
Miredo is an open-source Teredo IPv6 tunneling software, for the Linux, BSD and OS/X operating systems. It includes functional implementations of all components of the Teredo specification (client, relay and server). It is meant to provide IPv6 connectivity even from behind NAT devices.
There is more info, and software to download at the Miredo website.
Note that Miredo supports Teredo server, Teredo relay and Teredo client. From an ISP perspective, the Teredo client is not of interest since non-Windows clients generally get better results using 6to4 relaying.
[edit] Teredo server
A Teredo server needs two consecutive public IPv4 addresses, and global IPv6 connectivity.
Lets say the addresses are 192.0.2.100 and 192.0.2.101, on network interface eth0. Typically, you will already have configured 192.0.2.100 as the "normal" IP address on eth0. On Linux, you can add 192.0.2.101 with iproute2:
# /sbin/ip -4 address add 192.0.2.101/32 dev eth0
As regards miredo-server, you simply have to put this single directive into miredo-server.conf:
ServerBindAddress 192.0.2.100
On the firewall side, miredo-server requires UDP port 3544 to be "open" on the server, on both server's IPv4 addresses.
On the IPv6 side, no special setting should be needed. The server should simply have a working IPv6 connectivity. It must be allowed to emit ICMPv6 packets with source in range 2001:0::/32 and destination within 2000::/3.
[edit] Teredo relay
The Teredo relay requires a single (public) IPv4 address and IPv6 connectivity. In miredo.conf, the "RelayType restricted" directive should be sufficient (please comment out the ServerAddress directive if present). You can optionaly select a port number (BindPort 12345) if a fixed UDP port is needed, e.g. for firewalling purposes. IPv6 forwarding should be enabled on the host:
# echo -n 1 > /proc/sys/net/ipv6/conf/all/forwarding
Miredo will take care of adding required Teredo IPv6 routing and addressing on the host. However because IPv6 forwarding is enabled on the host, IPv6 autoconfiguration will no longer work, so you will have to setup the non-Teredo IPv6 addressing/routing manually.
An IPv6 route toward 2001:0::/32 should be exported to the other IPv6 routers. Miredo does NOT take care of that; it can be done with the usual mechanisms, either with manual routing configuration on the other routers, or with a dynamic routing protocol (BGP, OSPFv3, IS-IS, RIPng...). In the latter case a routing daemon will be needed in addition to Miredo (typically Quagga/Zebra or BIRD).
N.B.: it is perfectly ok to run miredo and miredo-server on the same host.
