Add HE IPv6 tunnel to openvz architecture vps through tb tun

September 28, 2018 1864 point heat 0 likes 0 comments

Register HE IPv6 tunnel

https://tunnelbroker.net

Create Regular Tunnel

After logging in, click Create Regular Tunnel
Select the nearest node

Compile and install tb tun

Download tb tun in your favorite way

Github:  https://github.com/acgrid/tb-tun

 wget  https://github.com/acgrid/tb-tun/archive/master.zip

Enter the tb tun file directory

After downloading and decompressing, move the file to the folder and enter the folder to execute the following command

Start Compiling

 gcc tb_userspace.c -l pthread -o tb_userspace

If gcc dependency is not installed, please install gcc first.

 yum install gcc

Create tunnel

The device needs to open tun/tap

Please use cat /dev/net/tun View
Under normal circumstances, it should prompt:
File descriptor in bad state

Set tunel

 setsid ./ tb_userspace he-ipv6 [server ipv4 addr] [client ipv4 addr] sit > /dev/null   ifconfig he-ipv6 inet6 add [client ipv6 addr] ifconfig he-ipv6 mtu 1480 ifconfig he-ipv6 up route -A inet6 add ::/0 dev he-ipv6 ip -6 route del default dev venet0

The address of [server ipv4 addr], [client ipv4 addr], [client ipv6 addr] should be modified by yourself

Test connection

 ping6 ipv6.google.com

Create a startup task

It will fail after power on. You need to start from setting the channel and continue to input. Please solve it yourself.

Gcod

If life is just like the first sight, what is the sad autumn wind painting fan

Article comments