diff options
author | Jonas Smedegaard <dr@jones.dk> | 2017-01-26 14:30:08 +0100 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2017-01-26 14:30:08 +0100 |
commit | e042b7bced715a9d0d6c660df453b1b68f263316 (patch) | |
tree | 13f1bcd2f7cccf87718d92b5fc9a112d4c3ea455 /ipmasq/rules/A01precompute.rul | |
parent | c778483fbd7829e2d41157ae6be2d7f1eef709f5 (diff) |
Drop ancient unused files.
Diffstat (limited to 'ipmasq/rules/A01precompute.rul')
-rw-r--r-- | ipmasq/rules/A01precompute.rul | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/ipmasq/rules/A01precompute.rul b/ipmasq/rules/A01precompute.rul deleted file mode 100644 index b1bc4ce..0000000 --- a/ipmasq/rules/A01precompute.rul +++ /dev/null @@ -1,56 +0,0 @@ -if [ "$SHOWRULES" = "yes" ]; then - echo "Interfaces found:" -fi - -# precompute ips and netmasks -if [ -n "$EXTERNAL" -o -n "$INTERNAL" -o -n "$IPSEC" ]; then - for i in $EXTERNAL $INTERNAL $IPSEC; do - ii=$(echo $i | sed -e 's/\:/_/g') - ip=$(ipofif $i) - nm=$(nmofif $i) - peer=$(peerofif $i) - bc=$(bcofif $i) - eval "IPOFIF_$ii=$ip" - eval "NMOFIF_$ii=$nm" - eval "PEEROFIF_$ii=$peer" - eval "BCOFIF_$ii=$bc" - if [ "$SHOWRULES" = "yes" ]; then - /bin/echo -e " $i\t$ip/$nm" - fi - done -fi - -# precompute ipsec connections -if [ -n "$IPSEC" ]; then - if [ "$SHOWRULES" = "yes" ]; then - echo "IPSec connections found:" - fi - IPSECCONN="" - for i in $IPSEC; do - ii=$(echo $i | sed -e 's/\:/_/g') - eval "ip=\$IPOFIF_$ii" - eval "nm=\$IPOFIF_$ii" - igw=$(ipsec look | grep IPIP:.*src=$ip | sed 's/^\([^[:blank:]]*\).*/\1/') - conncollect="" - for ipsecgw in $igw; do - conn=$(ipsec look | grep "=> $ipsecgw" | sed 's/^.*=>[[:blank:]]*\([^@[:blank:]]*\).*/\1/') - conncollect="$conncollect $conn" - eval "IPSEC_IF_$conn=$i" - cidrleft=$(ipsec look | grep "=> $ipsecgw" | sed 's/^\([^[:blank:]]*\)[[:blank:]]*->[[:blank:]]*[^[:blank:]]*.*/\1/') - eval "IPSEC_HERE_$conn=$cidrleft" - cidrright=$(ipsec look | grep "=> $ipsecgw" | sed 's/^[^[:blank:]]*[[:blank:]]*->[[:blank:]]*\([^[:blank:]]*\).*/\1/') - eval "IPSEC_THERE_$conn=$cidrright" - eval "IPSEC_THERE_$conn=$cidrright" - done - IPSECCONN="$IPSECCONN $conncollect" - eval "IPSECCONN_${ii}=\"$conncollect\"" - if [ "$SHOWRULES" = "yes" ]; then - /bin/echo -e " $i\t$ip/$nm" - for conn in $conncollect; do - eval "IPSEC_HERE=\$IPSEC_HERE_$conn" - eval "IPSEC_THERE=\$IPSEC_THERE_$conn" - /bin/echo -e " $IPSEC_HERE -> $IPSEC_THERE" - done - fi - done -fi |