IPv6 has been discussed for many years now. Spain is lagging behind in the adoption of this protocol; as of July 6, 2018, only 2.22% of traffic used IPv6. At Clouding, we are already working to increase this percentage 🙂. This will involve many changes to our platform, and it is not something we can implement in the short term.
Some customers have requested servers with IPv6 because they need it to validate an iOS app. One possible solution is to use Cloudflare and its Pseudo IPv4 service. Another option is to set up a tunnel with IPv6 to an IPv4 server. It may sound sophisticated, but it is not; in this article we will show you how to do it in 4 steps.
Sign up for Tunnelbroker
Go to the Tunnelbroker website and sign up. You will be asked for your details and will only need to verify your email address. With a free account, you can create up to 5 tunnels.
Create a tunnel in Tunnelbroker
To create a tunnel, go to the left-hand menu under “User functions” and click on “Create Regular Tunnel.” A screen will open where you will be asked for your server’s IPv4 address (“IPv4 Endpoint (Your side)”), and you will also be able to choose from several locations (“Available Tunnel Servers”) for your tunnel.
Configure the firewall
Before configuring the tunnel, the first thing to do is open protocol 41 on your firewall. To do this, create a custom rule like the following:
Configure the tunnel on Linux servers
You can now configure your IPv6 tunnel. Below are some examples for Linux and Windows. To do this, go to the “example configurations” tab of your tunnel in Tunnelbroker.
Log in to your server and create a network interface using the code provided by Tunnelbroker, vi /etc/network/interfaces.d/tunnel.cfg:
auto he-ipv6
iface he-ipv6 inet6 v4tunnel
address 2001:470:1f12:b8::2
netmask 64
endpoint 216.66.84.42
local 46.183.114.110
ttl 255
gateway 2001:470:1f12:b8::1
Restart the networking service and the tunnel will be up and running:
# systemctl restart networking.service
Log in to your server and run the code provided by Tunnelbroker:
# ifconfig sit0 up
# ifconfig sit0 inet6 tunnel ::216.66.84.42
# ifconfig sit1 up
# ifconfig sit1 inet6 add 2001:470:1f12:b8::2/64
# route -A inet6 add ::/0 dev sit1
Log in to your server and run the code provided by Tunnelbroker:
# modprobe ipv6
# ip tunnel add he-ipv6 mode sit remote 216.66.84.42 local 46.183.114.110 ttl 255
# ip link set he-ipv6 up
# ip addr add 2001:470:1f12:b8::2/64 dev he-ipv6
# ip route add ::/0 dev he-ipv6
# ip -f inet6 addr
Configure the tunnel on Windows servers
To create the tunnel on a Windows server, open a Command Prompt window as an administrator and run:
netsh interface teredo set state disabled
netsh interface ipv6 add v6v4tunnel interface=IP6Tunnel localaddress=46.183.114.110 remoteaddress=216.66.84.42
netsh interface ipv6 add address interface=IP6Tunnel address=2001:470:1f12:b8::2
netsh interface ipv6 add route prefix=::/0 interface=IP6Tunnel nexthop=2001:470:1f12:b8::1Have you tried it? Leave us your comments! 🙂