#! /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 /etc/tb_userspace isatap 166.111.21.1 [Client IPv4 Address] sit > /dev/null 2>&1 & sleep 3s # ugly, but doesn't seem to work at startup otherwise ifconfig isatap up ifconfig isatap inet6 add 2402:f000:1:1501:200:5efe:[Client IPv4 Address]/64 # Add as many of these as you need from your routed /64 allocation ifconfig isatap mtu 1480 route -A inet6 add ::/0 dev isatap route -A inet6 del ::/0 dev venet0 ;; stop) echo "Stopping ipv6tb" ifconfig isatap down route -A inet6 del ::/0 dev tb killall tb_userspace ;; *) echo "Usage: /etc/init.d/ipv6tb <ruby>start<rp> (</rp><rt>stop</rt><rp>) </rp></ruby>" exit 1 ;; esac exit 0