aboutsummaryrefslogtreecommitdiffstats
path: root/config/countryblock/execute.sh
diff options
context:
space:
mode:
authorTom Schaefer <tom@tomschaefer.org>2010-10-02 04:25:46 -0400
committerTom Schaefer <tom@tomschaefer.org>2010-10-02 04:25:46 -0400
commit3e334285ad161c5abdffc409854c4d690c2cab8d (patch)
tree5363659ebfa4f9cafd674fab8f4d5c75272c4ff7 /config/countryblock/execute.sh
parent5f0104bd9ab9c16db364c047a51334710b09d185 (diff)
downloadpfsense-packages-3e334285ad161c5abdffc409854c4d690c2cab8d.tar.gz
pfsense-packages-3e334285ad161c5abdffc409854c4d690c2cab8d.tar.bz2
pfsense-packages-3e334285ad161c5abdffc409854c4d690c2cab8d.zip
countryblock 1.7 - added two pages, redo on gui
Diffstat (limited to 'config/countryblock/execute.sh')
-rwxr-xr-xconfig/countryblock/execute.sh30
1 files changed, 16 insertions, 14 deletions
diff --git a/config/countryblock/execute.sh b/config/countryblock/execute.sh
index b70894e6..c51cf99e 100755
--- a/config/countryblock/execute.sh
+++ b/config/countryblock/execute.sh
@@ -10,9 +10,10 @@ export t=`grep -n 'User Aliases' /tmp/rules.debug |grep -o '[0-9]\{1,2\}'`
i=$(($i+'1'))
t=$(($t+'1'))
-#echo $i
-#echo $t
-
+#i = line where <snort2c> is
+#t is where 'User Aliases' is
+echo $i
+echo $t
rm /tmp/rules.debug.tmp
@@ -42,21 +43,22 @@ while read line
do a=$(($a+1));
echo $a;
if [ "$a" = "$i" ]; then
- for i in $(cat interfaces.txt); do
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 $i label 'countryblock'" >> /tmp/rules.debug.tmp
- echo "pass quick from $i to <countryblockW> label 'countryblock'" >> /tmp/rules.debug.tmp
- if [ -f logging ]; then
- echo "block log quick from <countryblock> to $i label 'countryblock'" >> /tmp/rules.debug.tmp
- else
- echo "block quick from <countryblock> to $i label 'countryblock'" >> /tmp/rules.debug.tmp
- fi
- if [ -f OUTBOUND ]; then
- echo "block quick from $i to <countryblock> label 'countryblock'" >> /tmp/rules.debug.tmp
- fi
+
+ for i in $(cat /usr/local/www/packages/countryblock/interfaces.txt); do
+ echo "pass quick from <countryblockW> to $i label 'countryblock'" >> /tmp/rules.debug.tmp
+ echo "pass quick from $i to <countryblockW> label 'countryblock'" >> /tmp/rules.debug.tmp
+ if [ -f logging ]; then
+ echo "block log quick from <countryblock> to $i label 'countryblock'" >> /tmp/rules.debug.tmp
+ else
+ echo "block quick from <countryblock> to $i label 'countryblock'" >> /tmp/rules.debug.tmp
+ fi
+ if [ -f OUTBOUND ]; then
+ echo "block quick from $i to <countryblock> label 'countryblock'" >> /tmp/rules.debug.tmp
+ fi
done
fi
echo $line >> /tmp/rules.debug.tmp