Using HiNet IPv6 tunnel broker on OS X.

HiNet is a popular ISP in Taiwan. Its IPv6 tunnel broker still works in year 2015. Why do I still need the tunnel broker, since the ISP provides native IPv6 service already? Because…

  1. I need IPv6 to work, apparently.
  2. I can only use native support in my home. Not in my office, not in my friend’s apartment.. etc.
  3. stf does not work behind NAT.

Okay it’s easy.

  1. You need gogoc-1_2-RELEASE.tar.gz. It’s ok to just pick it up from a FreeBSD distfile mirror.
  2. You need Xcode.
  3. You need tuntaposx.
  4. A little patch for gogoc-tsp/platform/darwin/tsp_local.c
    --- gogoc-1_2-RELEASE~/gogoc-tsp/platform/darwin/tsp_local.c 2010-03-08 04:08:27.000000000 +0800
    +++ gogoc-1_2-RELEASE/gogoc-tsp/platform/darwin/tsp_local.c 2015-09-12 03:31:50.000000000 +0800
    @@ -57,7 +57,7 @@
    void tspSetEnv(char *Variable, char *Value, int Flag)
    {
    Display(LOG_LEVEL_3, ELInfo, "tspSetEnv", GOGO_STR_ENV_PRINT_VALUE, Variable, Value);
    - setenv(Variable, Value, Flag);
    + if ( Value != NULL ) setenv(Variable, Value, Flag);
    }// --------------------------------------------------------------------------
  5. Config it properly and run it.

Now it’s okay to test by Chrome. Navigate to ipv6.google.com. Okay to ping6 -c3 ipv6.google.com also.

If you want it work in Firefox, Safari, you need a workaroud. Assign a static IPv6 IP in your en0 or en1. A documentary IP 2001:db8::1/64 will work. It’s a OS X problem.

Ref:
http://www.ipv6.hinet.net
https://www.sixxs.net/forum/?msg=setup-10869082
https://www.sixxs.net/tools/ipv6check/
https://tools.ietf.org/html/rfc3849
http://ekb.spirent.com/index?page=content&id=SOL10549&impressions=false
https://samsclass.info/ipv6/proj/gogo-Mac.htm
http://ipv6.speedtest6.com

PS:
% sw_vers -productVersion
10.10.5
% cc -v
Apple LLVM version 7.0.0 (clang-700.0.72)
Target: x86_64-apple-darwin14.5.0
Thread model: posix