User:Nathanlkoch/Tutorials/ipv6-he

From Gentoo Wiki
Jump to:navigation Jump to:search

Hurricane Electric IPv6 Tunnel

You can sign up for a IPv6 Delegation with Hurricane Electric and Tunnel Broker. Which is what deligates a large chunk of the IPv6 Internet Backbone Globally.

Sign up

Go to https://tunnelbroker.net/ to sign up.

Create

Create a new tunnel

Set your router firewall to receive ICMP pings

Screenshot from 2023-01-13 19-36-07.png

SystemD

Create a systemd script

FILE /etc/systemd/system/he-ipv6.service
[Unit]
Description=he.net IPv6 tunnel
After=network.target
After=NetworkManager.service

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/ip tunnel add he-ipv6 mode sit remote REMOTEIPPROVIDED local YOURLOCALIP ttl 255
ExecStart=/usr/bin/ip link set he-ipv6 up mtu 1280
ExecStart=/usr/bin/ip addr add YOURDEDICATEDIPV6 dev he-ipv6
ExecStart=/usr/bin/ip -6 route add ::/0 dev he-ipv6
ExecStop=/usr/bin/ip -6 route del ::/0 dev he-ipv6
ExecStop=/usr/bin/ip link set he-ipv6 down
ExecStop=/usr/bin/ip tunnel del he-ipv6
ExecStart=echo nameserver 2620:119:35::35 | sudo tee -a /etc/resolv.conf 
ExecStart=echo nameserver 2620:119:53::53 | sudo tee -a /etc/resolv.conf 

[Install]
WantedBy=multi-user.target
root #systemctl enable --now he-ipv6.service

Firewalld

Make sure you enable a default firewall zone for your ipv6 tunnel as your entire system will be exposed to the internet with an external routable address.


Done


Make sure you have ipv6 and sit tunnel interoperability enabled in your kernel if the following does not work.