2 PREFIX=$(printf "2002:%02x%02x:%02x%02x" $(echo MYIP_EXTERNAL | tr "." " ") )
4 /etc/network/interfaces:
8 up ip tunnel add tun6to4 mode sit ttl 64 remote any local MYIP_LOCAL
9 up ip link set dev tun6to4 up
10 up ip -6 addr add $PREFIX::1/16 dev tun6to4
11 up ip -6 route add 2000::/3 via ::192.88.99.1 dev tun6to4 metric 1
12 up ip -6 route add $PREFIX:0107::/64 dev local
13 down ip -6 route del $PREFIX:0107::/64 dev local
14 down ip -6 route flush dev tun6to4
15 down ip link set dev tun6to4 down
16 down ip tunnel del tun6to4
20 [[!tag CategoryCodeSnippets]]