diff options
author | Tom Schaefer <tom@tomschaefer.org> | 2010-07-25 15:08:58 -0400 |
---|---|---|
committer | Tom Schaefer <tom@tomschaefer.org> | 2010-07-25 15:08:58 -0400 |
commit | 7bcc2b400314dff7235bb635a9968d04d2e7df76 (patch) | |
tree | 2463b0a786f363dcbefcb5c68e4291e173c0e823 /config/countryblock/execute.sh | |
parent | 468555d49e2a96bf3f0747e67412a35c7f226570 (diff) | |
download | pfsense-packages-7bcc2b400314dff7235bb635a9968d04d2e7df76.tar.gz pfsense-packages-7bcc2b400314dff7235bb635a9968d04d2e7df76.tar.bz2 pfsense-packages-7bcc2b400314dff7235bb635a9968d04d2e7df76.zip |
Updated countryblock to 1.3
Diffstat (limited to 'config/countryblock/execute.sh')
-rw-r--r-- | config/countryblock/execute.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/config/countryblock/execute.sh b/config/countryblock/execute.sh index f109f896..350cd170 100644 --- a/config/countryblock/execute.sh +++ b/config/countryblock/execute.sh @@ -1,3 +1,4 @@ +#!/bin/sh pfctl -t countryblock -T kill sed -i -e '/countryblock/d' /tmp/rules.debug @@ -5,7 +6,7 @@ sed -i -e '/countryblock/d' /tmp/rules.debug #find my line for table export i=`grep -n 'block quick from any to <snort2c>' /tmp/rules.debug | grep -o '[0-9]\{2,4\}'` -export t=`grep -n 'User Aliases' /tmp/rules.debug |grep -o '[0-9]'` +export t=`grep -n 'User Aliases' /tmp/rules.debug |grep -o '[0-9]\{1,2\}'` i=$(($i+'1')) t=$(($t+'1')) @@ -44,6 +45,9 @@ while read line echo "" >> /tmp/rules.debug.tmp echo "#countryblock" >> /tmp/rules.debug.tmp echo "table <countryblock> persist file '/usr/local/www/packages/countryblock/lists/countries.txt'" >> /tmp/rules.debug.tmp + echo "table <countryblockW> persist file '/usr/local/www/packages/countryblock/countries-white.txt'" >> /tmp/rules.debug.tmp + echo "pass quick from <countryblockW> to any label 'countryblock'" >> /tmp/rules.debug.tmp + echo "pass quick from any to <countryblockW> label 'countryblock'" >> /tmp/rules.debug.tmp echo "block quick from <countryblock> to any label 'countryblock'" >> /tmp/rules.debug.tmp if [ -f OUTBOUND ]; then echo "block quick from any to <countryblock> label 'countryblock'" >> /tmp/rules.debug.tmp |