Script that build the 6rd tunnel

#!/bin/sh
#vconfig add eth0 201 
#ifconfig eth0.201 up
#ifconfig eth0 192.134.55.1
#echo 1 >  /proc/sys/net/ipv4/ip_forward
#iptables -F
#iptables -A POSTROUTING -t nat -s 192.134.55.0/24 -o eth1 -j SNAT --to-source 102.10.10.15

modprobe ipv6
echo 1 >  /proc/sys/net/ipv6/conf/all/forwarding

ip -6 route flush dev tun6rd
ifconfig tun6rd down
ip tunnel del tun6rd
ip tunnel add tun6rd mode sit remote any local 192.134.55.1 ttl 64
ip tunnel 6rd dev tun6rd 6rd-prefix 2001:470:8637:e000::/52 6rd-relay_prefix 192.134.55.0/24
ip link set tun6rd up
ip -6 addr add 3001::15 dev tun6rd
# routeadd
ip -6 route add 2001:470:8637:e000::/52 via ::192.134.55.224 dev tun6rd
ip -6 r a default via fe80::21f:d0ff:fe67:a88d dev eth1
ip -6 a a 2001:470:1f05:1553::200 dev eth1

你可能感兴趣的:(Script that build the 6rd tunnel)