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 Okay to ping6 -c3 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.


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


One thought on “Using HiNet IPv6 tunnel broker on OS X.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s