apt-get install gcc mkdir tb-tun cd tb-tun/ wget https://codeload.github.com/acgrid/tb-tun/zIP/master unzIP master cd tb-tun-master/ gcc tb_userspace.c -l pthread -o tb_userspace
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
#! /bin/sh ### BEGIN INIT INFO # Provides: IPv6 # Required-Start: $local_fs$all # Required-Stop: $local_fs$network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-DescrIPtion: starts the IPv6 tunnel # DescrIPtion: IPv6 tunnel start-stop-daemon ### END INIT INFO # /etc/init.d/IPv6tb
touch /var/lock/IPv6tb
case "$1" in start) echo "Starting IPv6tb " setsid [dir]/tb_userspace he-IPv6 [server IPv4 addr] [client IPv4 addr] sit > /dev/null 2>&1 & ###ugly, but doesn't seem to work at startup otherwise sleep 3s #Add as many of these as you need from your routed /64 allocation 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 ;; stop) echo "Stopping IPv6tb" ifconfig tb down route -A inet6 del ::/0 dev he-IPv6 killall tb_userspace ;; *) echo "Usage: /etc/init.d/IPv6tb {start|stop}" exit 1 ;; esac