Last active
January 10, 2017 11:08
-
-
Save elico/a54c2c8f8e1a2407b42210896b960f4b to your computer and use it in GitHub Desktop.
bypass squid interception for skype
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
#!/usr/bin/env bash | |
set -x | |
if [ "$1" == "tproxy" ];then | |
export TABLE=mangle | |
export TARGET=DIVERT | |
iptables -t $TABLE -L DIVERT | |
if [ "$?" -eq "0"]; then | |
echo "DIVERT EXISTS" | |
else | |
iptables -t mangle -N DIVERT | |
iptables -t mangle -A DIVERT -j MARK --set-mark 1 | |
iptables -t mangle -A DIVERT -j ACCEPT | |
fi | |
else | |
export TABLE=nat | |
export TARGET=ACCEPT | |
fi | |
iptables -t $TABLE -L PREROUTING |grep bypascidrspool | |
if [ "$?" -ne "0" ];then | |
iptables -t $TABLE -I PREROUTING -m set --match-set bypascidrspool dst,src -j $TARGET | |
fi | |
ipset create bypascidrspool hash:net | |
while read item; do | |
echo $item | |
ipset add bypascidrspool $item | |
done < cidr-to-bypass.txt | |
set +x |
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
157.56.135.64/26 | |
157.56.185.0/26 | |
157.56.52.0/26 | |
157.56.53.128/25 | |
157.56.198.0/26 | |
157.60.0.0/16 | |
157.54.0.0/15 | |
13.107.3.128/32 | |
13.107.3.129/32 | |
111.221.64.0/18 | |
91.190.216.0/21 | |
91.190.218.0/24 | |
40.126.129.109/32 | |
65.55.223.0/26 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment