Last active
September 17, 2024 08:12
Revisions
-
pklaus revised this gist
Sep 5, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -39,7 +39,7 @@ MYCUSTOMADDRESS=${HE64PREFIX}1:1 ####################################################################### #### Starting the actual script echo "Please enter the 'sudo' password. This is password of your user account on this Mac. It is needed to set up the IPv6 tunnel." sudo echo "Gained superuser permissions" if [ $? == 1 ]; then echo "Sorry! You need to provide your password in order to set up the tunnel."; exit 1; fi -
pklaus revised this gist
Sep 4, 2014 . 1 changed file with 2 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -67,9 +67,8 @@ sudo ifconfig $DEVNAME inet6 $MYCUSTOMADDRESS prefixlen 128 sudo ifconfig $DEVNAME inet6 $HECLIENT6END $HESERVER6END prefixlen 128 sudo route -n add -inet6 default $HECLIENT6END # We now provide the user with information if the tunnel has ben set up successfully: sleep 1 echo "The external IPv6 is now set to `curl -s 'http://ipv6.whatsmyip.reliable-ict.de/'`." echo "The external IP of your default connection is now set to `curl -s 'http://whatsmyip.reliable-ict.de/'`." -
pklaus revised this gist
Sep 4, 2014 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -24,9 +24,9 @@ DEVNAME='gif0' LOCAL_IPV4=`ifconfig $MYIF |grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}'` EXTERNAL_IPV4=`curl -s "http://ipv4.whatsmyip.reliable-ict.de/"` HEUSER='your.username' # The username you use to login at tunnelbroker.net HEKEY='32f325019357278d' # This 'Update Key' can be found on the 'Advanced' tab of the tunnel details page. HETUNNEL='12056' # The 'Tunnel ID' from the tab IPv6 tunnel on the tunnel details page. ### other settings from the website (the tunnel settings): HESERVER4END='216.66.80.30' -
pklaus revised this gist
Sep 4, 2014 . 1 changed file with 0 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -21,12 +21,8 @@ MYIF=`netstat -f inet -r | grep default | tr -s ' ' | cut -d ' ' -f 6 | sed -n 1 DEVNAME='gif0' LOCAL_IPV4=`ifconfig $MYIF |grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}'` EXTERNAL_IPV4=`curl -s "http://ipv4.whatsmyip.reliable-ict.de/"` HEUSER='your.username' # The username you use to login at tunnelbroker.net HEKEY='32f325019357278d' # This 'Update Key' can be found on the 'Advanced' tab of the tunnel details page. -
pklaus revised this gist
Sep 4, 2014 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ ### ### This configuration file must set the following variables: ### MYIF, DEVNAME, LOCAL_IPV4, EXTERNAL_IPV4, ### HEUSER, HEKEY, HETUNNEL, ### HESERVER4END, HESERVER6END and HECLIENT6END #MYIF="en1" # en1 = Airport, en0 = Ethernet @@ -28,8 +28,8 @@ EXTERNAL_IPV4=`curl -s "http://ipv4.whatsmyip.reliable-ict.de/"` # one more site, to get your external IPv4 IP: http://v4.ipv6-test.com/api/myip.php #EXTERNAL_IPV4='AUTO' # ← If you don't want to get use www.networksecuritytoolkit.org but tunnelbroker.net, then set it to AUTO HEUSER='your.username' # The username you use to login at tunnelbroker.net HEKEY='32f325019357278d' # This 'Update Key' can be found on the 'Advanced' tab of the tunnel details page. HETUNNEL=12056 # The 'Tunnel ID' from the tab IPv6 tunnel on the tunnel details page. ### other settings from the website (the tunnel settings): @@ -59,7 +59,7 @@ for i in {5..1}; do echo "$i"; sleep 1; done echo "Updating your IPv4 tunnel endpoint setting on the Hurricane Electric Website." # And instead of determining the external IPv4 address on your own, you can also set the param ip to AUTO. curl -k -s "https://ipv4.tunnelbroker.net/nic/update?username=$HEUSER&password=$HEKEY&hostname=$HETUNNEL&myip=$EXTERNAL_IPV4" # One more API of the tunnelbroker.net site is: https://username:password@tunnelbroker.net/tunnelInfo.php[?tid=tunnel_id] which returns an XML output sleep 1 -
pklaus revised this gist
Sep 4, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -24,7 +24,7 @@ DEVNAME='gif0' # LOCAL_IPV4=`ifconfig #MYIF | grep 'inet ' | tr -s ' ' | cut -d ' ' -f 2` # if you need to use your public ip address, use LOCAL_IP=$EXTERNAL_IPV4 instead LOCAL_IPV4=`ifconfig $MYIF |grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}'` #EXTERNAL_IPV4=`curl -s "http://www.networksecuritytoolkit.org/nst/cgi-bin/ip.cgi"` EXTERNAL_IPV4=`curl -s "http://ipv4.whatsmyip.reliable-ict.de/"` # one more site, to get your external IPv4 IP: http://v4.ipv6-test.com/api/myip.php #EXTERNAL_IPV4='AUTO' # ← If you don't want to get use www.networksecuritytoolkit.org but tunnelbroker.net, then set it to AUTO -
pklaus revised this gist
Sep 4, 2014 . 1 changed file with 4 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -27,9 +27,10 @@ LOCAL_IPV4=`ifconfig $MYIF |grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ EXTERNAL_IPV4=`curl -s "http://v4.ipv6-test.com/api/myip.php"` # one more site, to get your external IPv4 IP: http://v4.ipv6-test.com/api/myip.php #EXTERNAL_IPV4='AUTO' # ← If you don't want to get use www.networksecuritytoolkit.org but tunnelbroker.net, then set it to AUTO HEUSER='dn6483m67d411ba0.26906527' # 'User ID' to be found on the main page (home page) of tunnelbroker.net HEPASS='32f325019357278d1da3ba06887fa6f1' # This 'Update Key' can be found on the 'Advanced' tab of the tunnel details page. HETUNNEL=12056 # The 'Tunnel ID' from the tab IPv6 tunnel on the tunnel details page. ### other settings from the website (the tunnel settings): HESERVER4END='216.66.80.30' -
pklaus revised this gist
Sep 4, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
Empty file. -
pklaus revised this gist
Jan 2, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -17,7 +17,7 @@ ### HESERVER4END, HESERVER6END and HECLIENT6END #MYIF="en1" # en1 = Airport, en0 = Ethernet MYIF=`netstat -f inet -r | grep default | tr -s ' ' | cut -d ' ' -f 6 | sed -n 1p` # autodetect DEVNAME='gif0' -
pklaus revised this gist
May 9, 2011 . 1 changed file with 8 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -5,12 +5,9 @@ #### It is originally by freese60 and modified by limemonkey. #### Found on <http://www.tunnelbroker.net/forums/index.php?topic=287.0> ### Uncomment this line to debug the script: #set -x ####################################################################### #### Config start ### @@ -26,7 +23,8 @@ DEVNAME='gif0' # LOCAL_IPV4=`ifconfig #MYIF | grep 'inet ' | tr -s ' ' | cut -d ' ' -f 2` # if you need to use your public ip address, use LOCAL_IP=$EXTERNAL_IPV4 instead LOCAL_IPV4=`ifconfig $MYIF |grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}'` #EXTERNAL_IPV4=`curl -s "http://www.networksecuritytoolkit.org/nst/cgi-bin/ip.cgi"` EXTERNAL_IPV4=`curl -s "http://v4.ipv6-test.com/api/myip.php"` # one more site, to get your external IPv4 IP: http://v4.ipv6-test.com/api/myip.php #EXTERNAL_IPV4='AUTO' # ← If you don't want to get use www.networksecuritytoolkit.org but tunnelbroker.net, then set it to AUTO HEUSER='dn6483m67d411ba0.26906527' # hash from the website, "UserID" @@ -38,6 +36,9 @@ HESERVER4END='216.66.80.30' HESERVER6END=2001:470:1f0a:3333::1 HECLIENT6END=2001:470:1f0a:3333::2 HE64PREFIX=2001:470:1f0b:3333:: MYCUSTOMADDRESS=${HE64PREFIX}1:1 ####################################################################### #### Starting the actual script @@ -47,6 +48,7 @@ if [ $? == 1 ]; then echo "Sorry! You need to provide your password in order to echo "Remove previous tunnel (ignore any errors)" sudo ifconfig $DEVNAME down sudo ifconfig $DEVNAME inet6 $MYCUSTOMADDRESS prefixlen 128 delete sudo ifconfig $DEVNAME inet6 $HECLIENT6END $HESERVER6END prefixlen 128 delete sudo route delete -inet6 default -interface $DEVNAME sudo ifconfig $DEVNAME deletetunnel @@ -64,6 +66,7 @@ sleep 1 echo "Setting up the tunnel with the new settings now ." sudo ifconfig $DEVNAME create sudo ifconfig $DEVNAME tunnel $LOCAL_IPV4 $HESERVER4END sudo ifconfig $DEVNAME inet6 $MYCUSTOMADDRESS prefixlen 128 sudo ifconfig $DEVNAME inet6 $HECLIENT6END $HESERVER6END prefixlen 128 sudo route -n add -inet6 default $HECLIENT6END -
pklaus revised this gist
May 8, 2011 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,7 @@ #!/bin/bash #### This script is published by Philipp Klaus <philipp.l.klaus@web.de> #### on <http://blog.philippklaus.de/2011/05/ipv6-6in4-tunnel-via-hurricane-electric-tunnelbroker-net-automatic-ip-update-on-mac-os-x/> #### It is originally by freese60 and modified by limemonkey. #### Found on <http://www.tunnelbroker.net/forums/index.php?topic=287.0> -
pklaus revised this gist
May 7, 2011 . 2 changed files with 74 additions and 45 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,45 +0,0 @@ This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,74 @@ #!/bin/bash #### This script is published by Philipp Klaus <philipp.l.klaus@web.de> #### It is originally by freese60 and modified by limemonkey. #### Found on <http://www.tunnelbroker.net/forums/index.php?topic=287.0> # Uncomment this line to debug the script: #set -x ####################################################################### #### Config start ####################################################################### #### Config start ### ### This configuration file must set the following variables: ### MYIF, DEVNAME, LOCAL_IPV4, EXTERNAL_IPV4, ### HEUSER, HEPASS, HETUNNEL, ### HESERVER4END, HESERVER6END and HECLIENT6END #MYIF="en1" # en1 = Airport, en0 = Ethernet MYIF=`netstat -f inet -r | grep default | tr -s ' ' | cut -d ' ' -f 6` # autodetect DEVNAME='gif0' # LOCAL_IPV4=`ifconfig #MYIF | grep 'inet ' | tr -s ' ' | cut -d ' ' -f 2` # if you need to use your public ip address, use LOCAL_IP=$EXTERNAL_IPV4 instead LOCAL_IPV4=`ifconfig $MYIF |grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}'` EXTERNAL_IPV4=`curl -s "http://www.networksecuritytoolkit.org/nst/cgi-bin/ip.cgi"` # one more site, to get your external IPv4 IP: http://v4.ipv6-test.com/api/myip.php #EXTERNAL_IPV4='AUTO' # ← If you don't want to get use www.networksecuritytoolkit.org but tunnelbroker.net, then set it to AUTO HEUSER='dn6483m67d411ba0.26906527' # hash from the website, "UserID" HEPASS='32f325019357278d1da3ba06887fa6f1' # hash: echo -n MyPass|md5 HETUNNEL=12056 # from the website, "Global Tunnel ID" ### other settings from the website (the tunnel settings): HESERVER4END='216.66.80.30' HESERVER6END=2001:470:1f0a:3333::1 HECLIENT6END=2001:470:1f0a:3333::2 ####################################################################### #### Starting the actual script echo "Please enter your user account password. It is needed to set up the IPv6 tunnel." sudo echo "Gained superuser permissions" if [ $? == 1 ]; then echo "Sorry! You need to provide your password in order to set up the tunnel."; exit 1; fi echo "Remove previous tunnel (ignore any errors)" sudo ifconfig $DEVNAME down sudo ifconfig $DEVNAME inet6 $HECLIENT6END $HESERVER6END prefixlen 128 delete sudo route delete -inet6 default -interface $DEVNAME sudo ifconfig $DEVNAME deletetunnel echo "Removed the previous tunnel. Will continue to set up the tunnel in 5 seconds..." for i in {5..1}; do echo "$i"; sleep 1; done echo "Updating your IPv4 tunnel endpoint setting on the Hurricane Electric Website." # And instead of determining the external IPv4 address on your own, you can also set the param ip to AUTO. curl -k -s "https://ipv4.tunnelbroker.net/ipv4_end.php?ip=$EXTERNAL_IPV4&pass=$HEPASS&apikey=$HEUSER&tid=$HETUNNEL" # One more API of the tunnelbroker.net site is: https://username:password@tunnelbroker.net/tunnelInfo.php[?tid=tunnel_id] which returns an XML output sleep 1 echo "Setting up the tunnel with the new settings now ." sudo ifconfig $DEVNAME create sudo ifconfig $DEVNAME tunnel $LOCAL_IPV4 $HESERVER4END sudo ifconfig $DEVNAME inet6 $HECLIENT6END $HESERVER6END prefixlen 128 sudo route -n add -inet6 default $HECLIENT6END # We now provide the user with information if the tunnel has ben set up successfully: sleep 1 echo "The external IPv6 is now set to `curl -s 'http://v6.ipv6-test.com/api/myip.php'`." echo "The external IP of your default connection is now set to `curl -s 'http://v4v6.ipv6-test.com/api/myip.php'`." -
pklaus revised this gist
May 7, 2011 . 1 changed file with 42 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,45 @@ ####################################################################### # Config start ####################################################################### # Your Mac OS X account's password, needed for sudo PASS="pass1234" # en1 = Airport, en0 = Ethernet, would be nicer to detect the active interface automatically MYIF="en1" # Your Tunnel settings start here # 1. get HEUSER hash from the website, "UserID" # 2. get HEPASS hash: echo -n MyPass|md5 # 3. get HETUNNEL from the website, "Global Tunnel ID" # 4. get other settings from the website HEUSER=5d41402abc4b2a76b9719d911017c592 HEPASS=5d41402abc4b2a76b9719d911017c592 HETUNNEL=12123 HETHEIR4END=216.66.80.30 HEYOUR6END=2001:1234:1234:1234::2 HETHEIR6END=2001:1234:1234:1234::1 ####################################################################### # Config end ####################################################################### NEW_IP=`curl -s "http://www.networksecuritytoolkit.org/nst/cgi-bin/ip.cgi"` # if you need to use your public ip address, use LOCAL_IP=$NEW_IP instead LOCAL_IP=`ifconfig $MYIF |grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}'` #ignore any errors: echo $PASS |sudo -S ifconfig gif0 deletetunnel sudo ifconfig gif0 down sudo ifconfig gif0 inet6 delete $(ifconfig gif0 | sed -nE 's/.*inet6 ([0-9a-f:]+) .*/\1/p') sudo route delete -inet6 default -interface gif0 # update the tunnel curl -k -s "https://ipv4.tunnelbroker.net/ipv4_end.php?ipv4b=$NEW_IP&pass=$HEPASS&user_id=$HEUSER&tunnel_id=$HETUNNEL" echo " " sleep 1 sudo ifconfig gif0 tunnel $LOCAL_IP $HETHEIR4END sudo ifconfig gif0 inet6 $HEYOUR6END $HETHEIR6END prefixlen /128 sudo route -n add -inet6 default $HETHEIR6END -
pklaus created this gist
May 7, 2011 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ ####################################################################### # Update des HE (Hurricane Electric) ipv6-Tunnels, wegen der dynamischen IP ####################################################################### NEW_IP=`host freese.mx-host.de | grep -Eo '\<[[:digit:]]{1,3}(\.[[:digit:]]{1,3}){3}\>'` wget --no-check-certificate -T10 -a$LOG - "https://ipv4.tunnelbroker.net/ipv4_end.php?ipv4b=$NEW_IP&pass=YOUR_MD5_PASS&user_id=YOUR_HE_ID &tunnel_id=YOUR_HE_TUNNELID"