Tuesday, August 13, 2013

Setting up a Gogo6 / Freenet6 IPv6 tunnel in Linux

It's 2013....where's my IPV6? IPv6 was introduced to alleviate some of the problems with IPv4. It's been available for well over 10 years, but the internet is slow to adopt the new format. I wanted to start using IPv6 to become familiar with it but, like most ISPs, mine doesn't offer native IPv6.

When native IPv6 isn't available, one option is to use a tunnel broker. Basically a broker sets up a tunnel between your device and an endpoint at the broker. IPv6 is encapsulated in an IPv4 packet, sent through the tunnel to the broker, then sent out from there as IPv6. I looked at three brokers: Hurricane Electric, SixXS, and Gogo6 (which owns Freenet6). I chose Gogo6 for several reasons: it allows NAT traversal, it allows anonymous connections (the other two require registration), and it is touted as the easiest to set up. One of the down sides of using Gogo6 is that it currently appears to only have two Points of Presence (PoP), Montreal Canada and Amsterdam Netherlands. This is the location of the broker server, so your IPv6 traffic will appear to come from one of these areas.

To install the Gogo6 client in Ubuntu, run the following:
sudo apt-get install gogoc
This will install both gogoc and radvd. The radvd package is only needed if you plan on routing IPv6 from your PC. All done! You should now have an anonymous tunnel up and running. Test it by running
ping6 -c 5 ipv6.google.com
The tunnel will start when the system starts. If you don't want this, run
sudo mv /etc/rc5.d/S20gogoc /etc/rc5.d/s20gogoc
Then you can start and stop the tunnel with
sudo /etc/init.d/gogoc start
sudo /etc/init.d/gogoc stop

To install the Gogo6 client in Arch, install it from the AUR. Since this is Arch, I'll assume you know how to install a package from the AUR. To create the tunnel and start using IPv6, run (as root)
systemctl start gogoc
Wait a few seconds for the tunnel to come up and try pinging ipv6.google.com as above. If there are no problems and you want to create a tunnel when the system starts, run
systemctl enable gogoc

Anonymous connections are fine to play with but the IPv6 address will change when your IPv4 address changes. I suggest registering for an authenticated tunnel at Gogo6. This will get you a static IPv6 address, a DNS entry (e.g. username.broker.freenet6.net), and a /56 prefix (so you can set up a router and give out IPv6 addresses to the devices on your network if you want). If you do register, you'll have to edit the /etc/gogoc/gogoc.conf file and enter your username and password, and change the server to the authenticated one.

A couple of notes: IPv6 addresses are globally accessible, so make sure you have a firewall and that it is properly configured. And since traffic is going through a tunnel, speed will be impacted somewhat. Here are some of my speedtest results. Top bar (green) is IPv4 and bottom bar is IPv6.


Finally, here are some sites that might be of interest.
ipv6test.google.com
ipv6-test.com
ip6.me/
www.subnetonline.com/pages/ipv6-network-tools/online-ipv6-traceroute.php

8 comments:

  1. This is fantastic. I tried in vain to get gogo6 working from xubuntu using a manual procedure but failed. This simple instructoins worked first time ! :)

    Robert NZ

    ReplyDelete
  2. Yes the procedure I previously attempted was to compile and edit config files yuk ! - I didn't know there was a .deb package !

    Now how come ping6 from terminal does not reply with a ip address of the ipv6 host I ping6 e.g. ipv6.google.com ?

    ReplyDelete
    Replies
    1. It could be your ISP is caching the address, Does traceroute6 help find the issue?

      Delete
  3. If you do want to disable a service, please use the propper tools and do not rename the file. That might make coming upgrades go bad and Ubuntu/Debian packages will not know of what you want. Then next time the package get updated, it would reinstall a new version of the init script with propper name to start the service when rebooted next time.

    Use the command update-rc.d instead. According to its manual page, all that is needed is this command to disable it and to later enable it is as easy.

    sudo update-rc.d gogoc disable

    Happy hacking.
    PS: I started with 'man -k service', read the manual page with 'man service'. There I found the command update-rc.d mentioned in the "SEE ALSO" section and read that manual page 'man 8 update-rc.d'.
    DS:

    ReplyDelete
  4. Was working perfectly with utopic. Not working now with Xubuntu Vivid. Anyone else having this problem? Can you suggest a fix?

    ReplyDelete
    Replies
    1. I'm still running 14.04, so I can't test this. I suspect it might have to do with the switch to systemd. If you can provide the error messages you are seeing, that might help.

      Delete