From 378d3c8891283326fff27989ab375321ab523a04 Mon Sep 17 00:00:00 2001 From: N0YB Date: Tue, 18 Dec 2012 04:04:40 -0800 Subject: pfctrl is comment aware (#). Leave comments in place so last update info can be retrieved by diagnostics tables. Instead ensure private space is not included. --- etc/rc.update_bogons.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/rc.update_bogons.sh b/etc/rc.update_bogons.sh index f34964b..ee369ad 100755 --- a/etc/rc.update_bogons.sh +++ b/etc/rc.update_bogons.sh @@ -55,7 +55,7 @@ else fi if [ "$BOGON_V6_MD5" = "$ON_DISK_V6_MD5" ]; then - egrep -v "^#" /tmp/bogonsv6 > /etc/bogonsv6 + egrep -v "^fc00::/7" /tmp/bogonsv6 > /etc/bogonsv6 RESULT=`/sbin/pfctl -t bogonsv6 -T replace -f /etc/bogonsv6 2>&1` rm /tmp/bogonsv6 echo "Bogons V6 file downloaded: $RESULT" | logger -- cgit v1.1 From 274930095b899e2750b51a121a35efa8ea7ce1e7 Mon Sep 17 00:00:00 2001 From: N0YB Date: Mon, 24 Dec 2012 13:38:09 -0800 Subject: Add label to each pfctl logged result line, not just the first one. With this, log filtering can find both the addresses added and deleted bogon records. --- etc/rc.update_bogons.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'etc') diff --git a/etc/rc.update_bogons.sh b/etc/rc.update_bogons.sh index ee369ad..69870eb 100755 --- a/etc/rc.update_bogons.sh +++ b/etc/rc.update_bogons.sh @@ -48,7 +48,7 @@ if [ "$BOGON_V4_MD5" = "$ON_DISK_V4_MD5" ]; then egrep -v "^192.168.0.0/16|^172.16.0.0/12|^10.0.0.0/8" /tmp/bogons > /etc/bogons RESULT=`/sbin/pfctl -t bogons -T replace -f /etc/bogons 2>&1` rm /tmp/bogons - echo "Bogons V4 file downloaded: $RESULT" | logger + echo "$RESULT" |awk '{ print "Bogons V4 file downloaded: " $0 }' | logger else echo "Could not download http://files.pfsense.org/lists/fullbogons-ipv4.txt.md5 (md5 mismatch)" | logger md5_error="true" @@ -58,7 +58,7 @@ if [ "$BOGON_V6_MD5" = "$ON_DISK_V6_MD5" ]; then egrep -v "^fc00::/7" /tmp/bogonsv6 > /etc/bogonsv6 RESULT=`/sbin/pfctl -t bogonsv6 -T replace -f /etc/bogonsv6 2>&1` rm /tmp/bogonsv6 - echo "Bogons V6 file downloaded: $RESULT" | logger + echo "$RESULT" |awk '{ print "Bogons V6 file downloaded: " $0 }' | logger else echo "Could not download http://files.pfsense.org/lists/fullbogons-ipv6.txt.md5 (md5 mismatch)" | logger md5_error="true" -- cgit v1.1