Skip to content

Instantly share code, notes, and snippets.

@tomazursic
Last active August 27, 2018 09:50
Show Gist options
  • Save tomazursic/8dbcbc0a137c8d1b7d3c to your computer and use it in GitHub Desktop.
Save tomazursic/8dbcbc0a137c8d1b7d3c to your computer and use it in GitHub Desktop.
Setup ipv6 for Hurricane Electric

IPv6

dig aaaa ipv6.he.net
host -t aaaa ipv6.he.net
nslookup -tyle=aaa ipv6.he.net

ping6 <host> -c 1 -n
ping6 -I eth0 ff02::1

tracerute6 <host>
tracerute6 <host> -n
mtr <host> -r -c 10
tracepath6 <host>

sudo tcpdump -i eth0 -vv ip6

route -6

Google Public DNS IP addresses

The Google Public DNS IP addresses (IPv4) are as follows:

8.8.8.8 8.8.4.4

The Google Public DNS IPv6 addresses are as follows:

2001:4860:4860::8888 2001:4860:4860::8844

interfaces

auto lo
iface lo inet loopback

#iface eth0 inet dhcp
iface eth0 inet static
  address <static address>
  netmask <netmask>
  gateway <gateway>
  up ip -6 address add AAAA:BBB:CCCC::2/126 dev eth0
  up ip -6 route add 2000::/3 via AAAA:BBB:CCCC::1 dev eth0

allow-hotplug wlan0

iface wlan0 inet static
  address <static address>
  netmask <netmask>
  up ip -6 address add AAAA:BBB:CCCC:1::1/64 dev wlan0

up iptables-restore < /etc/iptables.ipv4.nat

radvd.conf

interface wlan0 {
    AdvSendAdvert on;
    prefix AAAA:BBB:CCCC:1::/64 {
        AdvOnLink on;
        AdvAutonomous on;
        AdvRouterAddr on;
        };
        };

ipv6 and Hurricane Electric

Register HE account for tunnel http://tunnelbroker.net/.

Setup interface

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

Bring up and verify

ifup he-ipv6

ping6 ipv6.google.com
# Option 2
nslookup
> set type=any <ip_addres/domanin_name>
@danyhm
Copy link

danyhm commented Aug 27, 2018

in this line
up ip -6 route add 2000::/3 via ::$SERVERIPV4ADDR dev he-ipv6
the ::$SERVERIPV4ADDR seems wrong and i couldn't bring up the interface.
without it , it worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment