Tunnelled IPv6 via Hurricane Electric on Ubuntu

Last updated May 16, 2009

Step 1) Register for a tunnel at tunnelbroker.net

Step 2) Add the following to /etc/network/interfaces:

    # $SERVERIPV4ADDR == Server IPv4 address as listed on tunnelbroker.net
    # $CLIENTIPV4ADDR == Client IPv4 address as listed on tunnelbroker.net
    # $CLIENTIPV6ADDR == Client IPv6 address as listed on tunnelbroker.net
    # $ROUTED64 == Routed /64 as listed on tunnelbroker.net
    #
    # IPv6 via HE tunnel...
    auto he-ipv6
    iface he-ipv6 inet6 v4tunnel
        address $CLIENTIPV6ADDR
        netmask 64
        remote $SERVERIPV4ADDR
        local $CLIENTIPV4ADDR
        endpoint any
        ttl 64
        up      ip -6 route add 2000::/3 via ::$SERVERIPV4ADDR dev he-ipv6
        up      ip -6 addr add $ROUTED64::1:1/128 dev he-ipv6
        up      ip -6 addr add $ROUTED64::2:1/128 dev he-ipv6
        down    ip -6 route flush dev he-ipv6

In the above example, $ROUTED64::1:1 is the first IPv6 address on that interface, $ROUTED64::2:1 is the second (if desired), etc.

Step 3) Bring up and verify:

    # ifup he-ipv6
    # ping6 ipv6.google.com