I recently obtained an Autonomous System Number (AS Number), along with one /44 and two /48 IPv6 addresses. Coincidentally, I remembered using HE.Net’s tunnel broker service before, so I decided to set up a sit tunnel broker service. This article does not explain how to obtain IPv6 addresses, please consult your hosting provider.

This article will use the open source tool - IPv6-in-IPv4 Tunnel.

Configuration tool

First, download the tool:

git clone [](

We enter the etc folder of the project and modify config.ini:

nano config.ini

Edit IPV6_NETWORK, IPV6_CIDR, INTERFACE, BIND_IP (if there are multiple IPv4 addresses).

Then press Crtl + X to save.

Modify system settings to allow IPv6 forwarding

nano /etc/sysctl.conf  
Add the following line at the bottom: net.ipv6.conf.all.forwarding = 1  
Save with Crtl + X.  
sysctl -p


iptables -I INPUT -p 41 --j ACCEPT  
iptables -I OUTPUT -p 41 --j ACCEPT  
iptables -I FORWARD -p 41 --j ACCEPT

Use the tool to create a server (add tunnel)

Assuming the tunnel ID is 1, the server IPv4 is, and the client IPv4 is

The IPv6 subnet set in the configuration file is 2a0e:b107:7e0::, and the subnet mask is 48 (must be a multiple of 8). The tool will automatically split it into a /64 subnet for the tunnel and a /64 subnet for the user route.

If the client needs to allocate to lower-level devices, it is recommended that the server subnet be greater than /64 so that a lower-level /64 subnet can be generated to ensure the operation of SLAAC.

Then we can configure the client! (The configuration process can refer to

Error: sipcalc required

I encountered this problem when adding the tunnel for the first time. The solution is as follows:

yum install sipcalc  
apt-get install sipcalc

Test results

Test results from

Route trace: