Teredo for MacOS X

Wednesday, February 21, 2007 by darco
Posted in , ,

As some of you may know, I've been playing around with IPv6 quite a bit lately. One specific IPv6 technology which has gotten me quite excited is the Teredo automatic tunneling protocol. Teredo allows you to obtain a globally routable IPv6 address when you only have access to the IPv4 internet, even if you are behind a NAT router1!

Support for the Teredo protocol is actually in WindowsXP, but it is disabled by default. However, that has changed for Windows Vista—where IPv6 and Teredo are enabled by default2. This is important because this means that relatively soon, widespread deployment of IPv6 will become a reality. This is great for Windows users, but what about other platforms?

Miredo is an open-source (GPL) user-space teredo implementation for linux and BSD. Someone went thru the effort to get miredo to work on MacOS X, but setting it up is not something your average joe can accomplish. What is needed is an installer package.

Well, that's exactly what I'm putting together. I'm releasing a prerelease version of the package today for early-adopters and power-users. You just download it, install it, and you should have IPv6 connectivity. It's that simple!

Prerelease 2

Download Here: Miredo Installer for MacOS X (Universal), and source code

Screen shot 2009-09-18 at 11.11.29 AM

IMPORTANT: This package is a prerelease version intended for early adopters, and is NOT intended for widespread deployment. If you decide to install and use this experimental package, you should subscribe to the miredo mailing list, paying serious attention to any security advisories.

If you want to uninstall, execute the uninstall-miredo.command script, located in the /Applications/Utilities folder.

Operating System Compatibility

This release will work fine with MacOS X 10.4 (Tiger) and MacOS X 10.5 (Leopard). It will also work with MacOS X 10.6 (SnowLeopard) as long as you are using the 32-bit kernel (very few people are using the 64-bit kernel at the moment, chances are you are using the 32-bit kernel). You will need to reinstall miredo-osx after upgrading to SnowLeopard.

Do not try to install this package on any earlier version of MacOS X!

Source Repository

A subversion repository is available here. The latest "stable" tag is probably what you want. UPDATE: I've moved the miredo-osx repository over to Github.

Special thanks to Mattias Nissler for his work on the MacOS X TUN/TAP Driver, which is included in this package and used by miredo.


  1. However, teredo will not work behind a symmetric type of NAT. In that case your only option is setting up some sort of manual tunnel.
  2. This is half-true. From the Microsoft Teredo page:
    In Windows Vista, the Teredo component is enabled but inactive by default. In order to become active, a user must either install an application that needs to use Teredo, or configure advanced Windows Firewall filter settings to allow edge traversal.

Trackback from your own site.

50 Comments for “Teredo for MacOS X”

  1. Andre Says:

    Between the work done by you here and 'Rémi Denis-Courmont' on Miredo, I think we almost have something that we can let loose on the general public. When you move beyond prerelease mode, I think a discussion forum would be handy, as well as listing on VersionTracker.

    It should be noted that Teredo was created because of NATs. Most 4to6 solutions are designed to work in environments where NAT does not exist, and therefore Microsoft came up with a solution knowing many people are stuck behind NATs these days.

    Keep up the good work!!

  2. Greg Harewood Says:

    I'm hoping that, by default, it only runs when a native LAN IPv6 address is not supplied. Ideally, it would go like this....

    1. Native address - use
    2. No native, check for legal address, try 6to4.
    3. RFC1918? Activate miredo.
    

    Any hope?

  3. darco* Says:

    @Greg: The default behavior is that miredo is disabled if a globally routable IPv6 address has already been assigned to at least one interface. So, yes there is hope. :)

    However... There is a bug if you put the machine to sleep with a teredo address and it wakes up on a network with native IPv6. In this case, miredo will unfortunately clobber the default IPv6 route when it tries to disable itself. >_<

  4. vincent Says:

    I've been playing with teredo (as supplied by you) for quite some time now. And I've been very happy with it. Keep up the good work.

  5. vincent Says:

    Is there a plan to release an OS X package based on a more recent version of miredo any time soon? If I understand things correctly, your package is built against 1.0.6.

  6. macbroadcast Says:

    http://twitpic.com/35an3

    when i type in any ip adress into my osx tiger "preference pane" , I get this "error 255" my miredo server runs on "ipsix.org"

    could someone confirm ?

    cheers

  7. Will Dean Says:

    I was able to find one bug. If you change the teredo server in the audo menu and click apply, it will cause a crash.

    Otherwise, works great. Thanks :)

  8. Nathan Ward Says:

    @darco: It would be nice if instead of disabling Teredo, the default behaviour is to bring it up, but route 2001::/32 at the Teredo interface - removing the need to send traffic via relays.

    About 98% of traffic on Teredo and 6to4 relays right now is bittorrent traffic, so OS X desktop boxes are likely to want to talk to other Teredo endpoints.

  9. Thaan Says:

    Hi,

    Are you planning on updating your Miredo package for Mac OS X 10.6? I've been using it everyday over the last year, and would love to update to Snow Leopard, but I can't without my lovely teredo connectivity.

    Yeah, you could consider this a cry for an updated version!

    Thanks,

    Thaan

  10. mtmatt Says:

    Agree with Thaan. Would really like to see an OS X 10.6 build.

  11. darco* Says:

    Sorry, I replied to Thaan in an email. Here is what I emailed him:

    I've had no problems using miredo-osx on Snow Leopard, without any changes. You may need to reinstall Miredo after installing Snow Leopard though.

    Thaan then reported to me that reinstalling miredo-osx did the trick.

  12. Michele D. Says:

    Darco, reinstalling Miredo does work with Snow Leopard indeed. Still, just to minimize the number of applications switching the System Preference to 32 bit, would it be possible to get it recompiled for SL? I also wonder if it may benefit from the 64 bits architecture as well (not likely, but still...). Thanks!

  13. darco* Says:

    The fact that the preference pane is 32 bit annoys me too, but I'm somewhat hesitant to roll another build just for that. It would provide no benefit and only increase the possibilities of things that could go wrong. If I roll an update, there is a lot more I would like to change than just the preference pane.

    At some point in the future I may take another look at miredo-osx and update it to be more modern... But for now it "works", so I have little inventive to "fix" it. The sources are freely available though. Feel free to fix it yourself.

  14. Dinesh Says:

    Hi Darco, Any possibility of incorporating the latest 1.2.1 release of Miredo into Miredo for OS X?

    Basically 1.2.1 "...fixes a deadlock when Miredo fails to initialize properly."

    Thank you...

  15. darco* Says:

    Sorry, way to busy with work to try and mess with miredo-osx right now. :(

  16. Geoff Says:

    Hi darco, looks like miredo has stopped working with the latest macosx update 10.6.2, for me anyways. Wish I knew how to build a new version, don suppose you get any buddies who can work on it lol. Thx

  17. darco* Says:

    Miredo-OSX seems to work just fine for me after the 10.6.2 update. If it is giving you problems, try re-installing.

  18. x2look4 Says:

    no go for me since 10.6, already de- and reinstalled several times. toerod tunnel button stays red

  19. darco* Says:

    That means it is having trouble with the given teredo server. Try teredo.ipv6.microsoft.com instead.

  20. Simon Says:

    Hi,

    I am using your miredo-osx package as well, and it works for teredo.ipv6.microsoft.com but I don't seem to get it to work with another server. The light doesn't turn green but turns orange instead, what does this mean exactly and what can I do to solve it?

    I know the server supports ipv6 because I can access it on teredo (windows) without any problems. Help?

  21. Geoff Says:

    Hi,

    Just been invetigating the 32/64 bit kernel topic in snow leopard and realised I was running in 32bit mode, so managed to set my macpro to boot up in 64bit mode and as usual tried to run miredo and suprise suprise it wont run in 64 bit kernel mode :( guess Im stuck with a 32bit kernel till someone saves the day...

  22. macing Says:

    Hi,

    Our school use the isatap,so how to use ipv6 in Mac.I need your help,please feel free to give me an e-mail.Thank you.

  23. darco* Says:

    @geoff: The only thing that needs to be 64-bit is the tun-tap driver. Try installing miredo-osx and then installing the latest 64-bit tun-tap driver from http://tuntaposx.sourceforge.net/

  24. Geoff Says:

    Thanks again, seems to have worked.

  25. Hiro Says:

    @geoff: The only thing that needs to be 64-bit is the tun-tap driver. Try installing miredo-osx and then installing the latest 64-bit tun-tap driver from http://tuntaposx.sourceforge.net/

    really worked

  26. darco* Says:

    @macing: Sorry, I don't use isatap, so I've had no motivation to support it. Miredo itself does seem to support it, so I would recommend reading up on how to configure Miredo directly to support isatap.

  27. snowy* Says:

    Hi Darco,

    Many thanks for a great app! Works well for getting IPv6 peers while using Transmission. :)

    Lately, I've been trying to tune-up my boot process (late 2006 Intel iMac) and have noticed the following in my console logs. Miredo was installed April 2010.

    SL 10.6.5

    12/14/10 1:23:18 PM miredo[44] Error: /dev/tun0 character device not found or unavailable. 12/14/10 1:23:18 PM miredo[44] You can obtain a tunnel driver for the Darwin kernel (Mac OS X) from: 12/14/10 1:23:18 PM miredo[44] http://www-user.rhrk.uni-kl.de/~nissler/tuntap/ 12/14/10 1:23:18 PM com.apple.launchd[1] (miredo[44]) Exited with exit code: 1 12/14/10 1:23:18 PM miredo[71] Error: /dev/tun0 character device not found or unavailable. 12/14/10 1:23:18 PM miredo[71] You can obtain a tunnel driver for the Darwin kernel (Mac OS X) from: 12/14/10 1:23:18 PM miredo[71] http://www-user.rhrk.uni-kl.de/~nissler/tuntap/ 12/14/10 1:23:18 PM com.apple.launchd[1] (miredo[71]) Exited with exit code: 1 12/14/10 1:23:18 PM com.apple.launchd[1] (miredo) Throttling respawn: Will start in 10 seconds 12/14/10 1:23:28 PM miredo[80] Error: /dev/tun0 character device not found or unavailable. 12/14/10 1:23:28 PM miredo[80] You can obtain a tunnel driver for the Darwin kernel (Mac OS X) from: 12/14/10 1:23:28 PM miredo[80] http://www-user.rhrk.uni-kl.de/~nissler/tuntap/ 12/14/10 1:23:28 PM com.apple.launchd[1] (miredo[80]) Exited with exit code: 1 12/14/10 1:23:28 PM com.apple.launchd[1] (miredo) Throttling respawn: Will start in 10 seconds 12/14/10 1:23:38 PM com.apple.SystemStarter[18] Initializing tap devices 12/14/10 1:23:38 PM com.apple.SystemStarter[18] Initializing tun devices 12/14/10 1:23:39 PM miredo[89] miredo[89]: Starting... 12/14/10 1:23:39 PM miredo[89] Starting addrwatch... 12/14/10 1:23:40 PM miredo[89] miredo[90]: Symmetric NAT detected. IPv6 connectivity will be limited. 12/14/10 1:23:40 PM miredo[89] miredo[90]: Qualified (NAT type: restricted) 12/14/10 1:23:40 PM miredo[89] miredo[90]: New Teredo address/MTU 12/14/10 1:23:40 PM miredo[89] miredo[90]: Teredo pseudo-tunnel started 12/14/10 1:23:40 PM miredo[89] miredo[90]: (address: 2001::removedforprivacy, MTU: 1280) 12/14/10 1:23:40 PM miredo[89] miredo[91]: Executing "killall -HUP lookupd DirectoryService".

    Seems launchd tries to start miredo before SystemStarter initializes tap and tun. Would this increase my boot time and can anything be done about it? Tap and tun are in /Library/StartupItems.

    P.S. Ever thought of working on PG2 for OS X? The dev (qnation) seems to have disappeared.

    Thanks!

  28. Mike Gifford Says:

    Any updates for 2011. Seems like there was a Prerelease in 2007 and nothing since then. Would also be good if this project were up on SF.net or something like that.

  29. darco* Says:

    For various reasons I am unable to contribute to this project at this time, but if anyone would like to contribute some updates feel free to fork this project on Github and send me a pull request.

  30. AprilHare Says:

    "It will also work with MacOS X 10.6 (SnowLeopard) as long as you are using the 32-bit kernel (very few people are using the 64-bit kernel at the moment, chances are you are using the 32-bit kernel)." A lot more people are using the 64-bit kernel. In fact, Macbook Pros purchased this year came with 64-bit kernel by default, and no doubt other new Macs are now the same. Time to port to 64-bit..

  31. darco* Says:

    @AprilHare: As I mentioned above, you can get this to work on a 64-bit kernel by simply installing the latest version of tuntap: http://tuntaposx.sourceforge.net/

  32. KenW Says:

    Wow – it works! I spent all IPv6 Day yesterday trying to learn about IPv6 and why I couldn't have any (short answer: Verizon). Today I learned enough more to find Meredo, and BAM: from 0/10 to 7/10 on test-ipv6.com! Awesome.

    It looks to me like Meredo is the way to go for residential Mac users, and will continue to be so until either Apple builds Teredo into OS X (unlikely) or residential ISPs roll out support for IPv6 (more unlikely). So I hope you can keep up the good work, or find someone else to (sorry I'm not a programmer).

  33. darco* Says:

    The renewed interest in this project that was spawned from World IPv6 Day has me somewhat concerned.

    I can't really recommend anyone other than "experts" use this software in its current state. A lot of work needs to be done on it before I would consider unleashing it for normal users.

    I would love it if someone would take up the reigns and continue to develop the code, as I am not in a position to work on this project at this time.

    And as a side note... Some residential ISPs are rolling out IPv6 sooner than you think. Comcast seems on track to offering native dual-stacked IPv6 to all of its customers relatively soon.

  34. KenW Says:

    I hear you. I am also hearing that Tunnelbroker.com is the way to go for residential Mac users with immediate IPv6 need....

    FYI, test-ipv6.com only gave Miredo-OSX a 7/10 because it tunnelled IPv6 when an IPv4 path was available. Not sure whose to-do list that belongs on (configuration or implementation).

  35. exsystem Says:

    hi, miredo is incompatible with MAC OS X LION 10.7(GM), so what can i do?

  36. exsystem Says:

    PROBLEM SOLVED! it is caused by 64-bit for mac os x lion 10.7, just install another package called 'tuntap', which can be found here.

  37. Geoff Says:

    Thanks exsystem

  38. Theodore Says:

    hello after i installed little snitch mac os x app the app stopped working and i can't get ipv6 connections now anything you can help me with to get ipv6 back again?

  39. whm Says:

    Thank you for the advice.It is really helpful!!!!

  40. summer Says:

    hello,after i installed miredo and tun tap in turn , the light turned on grey, what can i do ?

  41. summer Says:

    and i cannot get the teredo address , can you do me a favor?

  42. darco* Says:

    When in 'autoclient' mode, the light turns gray when you already have an IPv6 connection, and teredo shouldn't be on.

    If you want to force teredo to always be on, I think you can change it to 'client', and this will force it to always attempt to maintain the tunnel.

  43. Gosat Says:

    OS X Lion users: Install BOTH Miredo AND the tun tap drivers [url=http://downloads.sourceforge.net/tuntaposx/tuntap_20090913.tar.gz]Found here[/url]. It works like a charm!

  44. summer Says:

    thank you very much ?but i still cannot connected in ipv6?is there any problems i can deal with?

  45. Raoul Says:

    See http://tuntaposx.sourceforge.net/index.xhtml

  46. Josh Lehan Says:

    After upgrading to Lion, Miredo broke. The solution is just to reinstall the TunTap drivers that Miredo needs.

    http://tuntaposx.sourceforge.net/download.xhtml

    Get the latest version for Lion, which is dated 20111101.

    After that, Miredo started working perfectly again :)

  47. abdlah Says:

    merci

  48. Josh Lehan Says:

    Miredo works on 64-bit Lion, but it appears the "Autoclient" feature is broken.

    If I'm on an IPv4-only network, Miredo will establish an IPv6 tunnel just fine.

    However, if I move to a network that has a working IPv6 router already, that's a big problem, because Miredo won't get its Teredo tunnel out of the way. It ends up conflicting with the existing IPv6 route that's autoconfigured by Apple's built-in IPv6 networking. IPv6 will fail, because the default route won't be correct.

    Oftentimes, neither Miredo nor the native IPv6 will succeed in establishing a default route, leaving my iPv6 connection in a broken state. What's more, when moving away from an IPv6-enabled network, to a network that only supports IPv4, Miredo will not re-establish the Teredo route correctly. It appears to reconnect the tunnel after a few minutes, successfully, however, it's useless without a route through it.

    It's a big problem on Mac OS X in general, because it seems Mac OS X doesn't support the "metric" column of the routing table (as do Linux and Windows). So, the common workaround of giving Teredo a high metric, so that it's used only as a last resort, will not work.

    Any workarounds for this?

Comment on this post

* required

(or just Login »)


Type these numbers into the given field. This is how to make sure you aren't a computer.


Fork me on GitHub