aboutsummaryrefslogtreecommitdiffstats
path: root/config/pfblockerng
diff options
context:
space:
mode:
authorBBcan177 <bbcan177@gmail.com>2015-09-07 23:24:45 -0400
committerBBcan177 <bbcan177@gmail.com>2015-09-07 23:24:45 -0400
commitd7152f8d965ed3b22f7b64eaadd6a4f77dfe58d8 (patch)
tree6707fe95724e479e8f3f5d6780de9c2b552790ce /config/pfblockerng
parentc7dea9da875ccfd02500bc74233a8f82abf65107 (diff)
downloadpfsense-packages-d7152f8d965ed3b22f7b64eaadd6a4f77dfe58d8.tar.gz
pfsense-packages-d7152f8d965ed3b22f7b64eaadd6a4f77dfe58d8.tar.bz2
pfsense-packages-d7152f8d965ed3b22f7b64eaadd6a4f77dfe58d8.zip
Fix small bug
Diffstat (limited to 'config/pfblockerng')
-rw-r--r--config/pfblockerng/pfblockerng.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/config/pfblockerng/pfblockerng.sh b/config/pfblockerng/pfblockerng.sh
index a5a47058..5858b08b 100644
--- a/config/pfblockerng/pfblockerng.sh
+++ b/config/pfblockerng/pfblockerng.sh
@@ -235,11 +235,11 @@ cp $pfbdeny$alias".txt" $tempfile; > $dedupfile
data255="$(cut -d '.' -f 1-3 $tempfile | awk '{a[$0]++}END{for(i in a){if(a[i] > 255){print i}}}')"
if [ ! -z "$data255" ]; then
for ip in $data255; do
- ii=$(echo "^$ip" | sed 's/\./\\\./g')
+ ii=$(echo "^$ip." | sed 's/\./\\\./g')
grep $ii $tempfile >> $dedupfile
done
awk 'FNR==NR{a[$0];next}!($0 in a)' $dedupfile $tempfile > $pfbdeny$alias".txt"
- for ip in $data255; do echo $ip"0/24" >> $pfbdeny$alias".txt"; done
+ for ip in $data255; do echo $ip".0/24" >> $pfbdeny$alias".txt"; done
fi
}
@@ -334,7 +334,6 @@ if [ -e "$pfbsuppression" ] && [ -s "$pfbsuppression" ]; then
octet4=$(echo $ip | cut -d '.' -f 4 | sed 's/\/.*//')
dcheck=$(grep $iptrim".0/24" $dupfile)
if [ "$dcheck" == "" ]; then
- echo $iptrim".0" >> $tempfile
echo $iptrim".0/24" >> $dupfile
counter=$(($counter + 1))
# Add Individual IP addresses from Range excluding Suppressed IP