Teredo IPv6 in Gentoo

The world is running out of IP addresses. IPv6 to the rescue! Unfortunately most ISPs dont yet provide IPv6 connectivity. But be sure to ask your provider in order to increase awareness.

In the meantime a number of tunnelling mechanisms have been developed, among them Teredo. Miredo is a GPL implementation of Teredo and it is now available in Portage.

The advantage of Toredo is, that it also works through NAT. Windows Vista and later have Teredo support built-in.

To enable Teredo on Gentoo, simply sync portage and emerge and start miredo:

$ sudo eix-sync
$ sudo emerge -av net-misc/miredo
$ sudo /etc/init.d/miredo start

To start miredo at boot, do

$ sudo rc-update add miredo default

Now go to http://www.kame.net/ and watch the turtle dance πŸ˜‰

10 thoughts on “Teredo IPv6 in Gentoo”

  1. Cool! Works like charm πŸ˜‰ the only grrr was when the init script tried to load the ipv6 module which i have compiled into the kernel. I didn’t expect that I’d have to configure such a simple utility. So, an elog in the ebuild explaining that one really should look into conf.d might help πŸ˜‰

    Anyways, thanks πŸ™‚

  2. Oh … one more thing: does miredo have to “need net”? On my laptop, either wlan0 or eth0 are working. “need net” makes miredo wait till both are started, so i had edit the init script …

  3. @Pavel: The autoloading of modules was an owersight on my part. It’s now disabled by default. So, how did you edit the init script regarding need net?

    Thanks
    Thilo

  4. Thanks for guide!
    I’d added kernel checks for IPv6 to ebuild with ewarns if absent

  5. Thanks for the e-build; it’s working great.

    Although, I am having one issue that I can’t seem to solve. While I can access ipv6.google.com with no problem, I always end up on the IPv4 site for http://www.kame.net. It would seem that firefox/chromium are preferring IPv4 when an address resolves to both IPv4 and IPv6.

    I’ve done considerable searching with Google to try and find a way to reverse the preference, but have turned up nothing. Does anybody know how to tell the system to use IPv6 when there is a choice?

    Thanks.

  6. @Kevin:
    When I resolve http://www.kame.net i get:
    bangert@marsupilami ~ $ dnsip6 http://www.kame.net
    ::ffff:203.178.141.194 2001:200::8002:203:47ff:fea5:3085
    bangert@marsupilami ~ $ dnsip6 http://www.kame.net
    2001:200::8002:203:47ff:fea5:3085 ::ffff:203.178.141.194
    bangert@marsupilami ~ $ dnsip6 http://www.kame.net
    ::ffff:203.178.141.194 2001:200::8002:203:47ff:fea5:3085

    So both the IPv6 and the IPv4 address are returned.
    Maybe your resolver only returns the IPv4 address?

    Try setting your nameserver in /etc/resolv.conf to googles dns (8.8.8.8 and 8.8.4.4) – it returns both
    the ipv4 and the IPv6 address also:

    bangert@marsupilami ~ $ DNSCACHEIP=8.8.8.8 dnsip6 http://www.kame.net
    ::ffff:203.178.141.194 2001:200::8002:203:47ff:fea5:3085

  7. Hmm.. Thanks for the suggestions, but unfortunately I *AM* getting the proper AAAA records back. “host” returns both an IPv4 and an IPv6 address. (What package is dnsip6 in?) And ping6 and the like work just fine, too. It really seems like either firefox/chromium or getaddrinfo() is defaulting to the IPv4 address if both types are found.

    I’ve looked in /etc/gai.conf, but I really don’t understand IPv6 and RFC 3484 well enough to figure it out, and there was no obvious way to say prefer IPv6 in there.

    Oh well, it’s not a critical issue. The only thing I haven’t been able to get working is the dancing turtle, so it’s no big deal.

    Thanks, though.

Comments are closed.