Created
May 9, 2011 09:37
-
-
Save pklaus/962287 to your computer and use it in GitHub Desktop.
tunnelbroker.net : deprecated tunnel setup on Linux using "ifconfig" and "route"
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/bash | |
# Using "ifconfig" and "route" (deprecated) | |
# <http://tldp.org/HOWTO/Linux+IPv6-HOWTO/conf-ipv6-in-ipv4-point-to-point-tunnels.html> | |
# You should rather use this one instead (makes use of the tool "ip"): <https://gist.github.com/962408> | |
# Run like this: | |
# sudo ./tunnelbroker-net.linux-deprecated.sh | |
set -x | |
DEV0="sit0" | |
DEV1="sit1" | |
HEIPV4SERVER="::216.66.80.30" | |
HEIPV6CLIENT="2001:470:1f0a:2abc::2/64" | |
ifconfig $DEV0 up | |
ifconfig $DEV0 inet6 tunnel $HEIPV4SERVER | |
ifconfig $DEV1 up | |
ifconfig $DEV1 inet6 add $HEIPV6CLIENT | |
route -A inet6 add ::/0 dev $DEV1 | |
cat << EOF | |
You set up the tunnel. To remove the tunnel again, run those commands as root: | |
route -A inet6 delete ::/0 dev $DEV1 | |
ifconfig $DEV1 down | |
ifconfig $DEV0 down | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment