1 #!/usr/local/bin/bash 2 #IPv6: 2001:618:400:52e7::/64 3 4 #tunnel 5 tif="gif0" 6 #interphase physique 7 lif="rl1" 8 9 # addr ipv4 locale 10 myip=82.231.146.43 11 # addr ipv3 du TB 12 gate=213.121.24.85 13 14 # addr ipv6 locale 15 myipv6=2001:618:400:971e::1 16 myipv6=2001:618:400::52e7:922b 17 18 19 start(){ 20 echo "creation $itf" 21 ifconfig $tif create 22 #create ipv4 tunnel 23 echo "tunnel part1" 24 ifconfig $tif giftunnel $myip $gate 25 #then ipv6 one 26 echo "tunnel part2" 27 ifconfig $lif inet6 $myipv6 28 #routing rules 29 echo "routing rules" 30 route add -inet6 default fe80::%$tif 31 }