Created
May 11, 2013 16:44
-
-
Save vuryleo/5560555 to your computer and use it in GitHub Desktop.
isatap script for THU
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
LAN_IP=`/sbin/ifconfig $1 | grep inet | grep -v inet6 | awk '{print $2}'` | |
WAN_IP=`/sbin/ifconfig $1 | grep inet | grep -v inet6 | awk '{print $2}'` | |
#LAN_IP=59.66.0.0 | |
#WAN_IP=59.66.0.0 # replace with your wan ip | |
# just for Tsinghua's ISATAP router | |
echo $LAN_IP | |
route delete -inet6 default | |
/sbin/ifconfig gif0 tunnel $LAN_IP isatap.tsinghua.edu.cn | |
/sbin/ifconfig gif0 inet6 2402:f000:1:1501:200:5efe:$WAN_IP prefixlen 64 | |
/sbin/route add -inet6 default 2402:f000:1:1501::1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment