Published: 11.03.2010
IPv6, the next generation Internet Protocol, brings a wealth of possibilities to your network, system, and services. In this guide, we’ll walk you through the process of establishing an IPv6 network tunnel on both MAC OS X and Linux.
Step 1: Choose an IPv6 Tunnel Broker
First, you need to select an IPv6 tunnel broker. These brokers provide the essential infrastructure to connect your network to the IPv6 world. There are several options available, but for this guide, we’ll use Hurricane Electric, a free and reliable tunnel broker. You can find a list of tunnel brokers here.
Step 2: Creating the Tunnel
With your selected tunnel broker, follow these steps to create your IPv6 tunnel:
- Visit your chosen tunnel broker’s website and sign up for an account.
- Once logged in, create a tunnel by specifying your public IPv4 address.
- Your tunnel broker will assign you a range of IPv6 addresses, which you will need in the next steps.
Step 3: Configuration for MAC OS X
For MAC OS X, here are the steps to configure your machine for the IPv6 tunnel:
- Configure the tunnel with your assigned IPv4 and IPv6 addresses:
$ sudo ifconfig gif0 tunnel host_ip tunnel_broker_ipv4_ip
Replace host_ip
with your machine’s private address or public IP if you’re not behind NAT.
Set up the tunnel endpoints:
$ sudo ifconfig gif0 inet6 host_ipv6_address tunnel_broker_ipv6_address prefixlen 128
These IPv6 addresses are assigned by the tunnel broker.
- Add a default route for IPv6 traffic:
$ sudo route -n add -inet6 default tunnel_broker_ipv6_address
- To ensure IPv6 is enabled on the interface, use:
$ sudo ip6 -x gif0
- Test your IPv6 connectivity:
$ ping6 ipv6.google.com
$ telnet ipv6.google.com 80
Step 4: Configuration for Linux
The process is nearly identical on Linux:
- Confirm that the IPv6 module is present in the kernel:
$ sudo modprobe ipv6
- Create the tunnel:
$ sudo ip tunnel add he-ipv6 mode sit remote 216.66.xx.xx local 192.168.1.2 ttl 255
Replace local
with your public IP if directly assigned.
- Activate the tunnel:
$ sudo ip link set he-ipv6 up
- Assign an IP address to the interface:
$ sudo ip addr add 2001:470:xxxx:xxxx::2/64 dev he-ipv6
- Add a default route for IPv6:
$ sudo ip route add ::/0 dev he-ipv6
- Add a protocol family identifier:
$ sudo ip -f inet6 addr
With these steps, your MAC or Linux machine is now equipped with an IPv6 tunnel, allowing you to access IPv6 networks.
Leave a Reply