summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-11-27 20:28:02 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-11-27 20:28:02 +0000
commit38b65b801cbc74e0f03e2ce3e46894e95d7afcec (patch)
treec442776ecb24396056b088b74d995b65178d13c5 /etc
parentd35fa17e1d389b7e19f2ae7aaf293c58a38cacd8 (diff)
downloadpfsense-38b65b801cbc74e0f03e2ce3e46894e95d7afcec.zip
pfsense-38b65b801cbc74e0f03e2ce3e46894e95d7afcec.tar.gz
* Download bogons entries from pfsense.com
* Do not update on every minute on the 1st of the month * Sleep for a random period before updating to avoid killing the server
Diffstat (limited to 'etc')
-rwxr-xr-xetc/rc.update_bogons.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/etc/rc.update_bogons.sh b/etc/rc.update_bogons.sh
index 562c79b..8221ad4 100755
--- a/etc/rc.update_bogons.sh
+++ b/etc/rc.update_bogons.sh
@@ -4,8 +4,17 @@
# Part of the pfSense project
# www.pfsense.com
+# Grab a random value between 0-999.
+value=$RANDOM
+while [ $value -gt 999 ] ; do
+ value=$RANDOM
+done
+
+# Sleep for that time.
+sleep $value
+
/etc/rc.conf_mount_rw
-/usr/bin/fetch -q -o /tmp/bogons "http://www.cymru.com/Documents/bogon-bn-nonagg.txt"
+/usr/bin/fetch -q -o /tmp/bogons "http://www.pfsense.com/mirrors/bogon-bn-nonagg.txt"
egrep -v "^192.168.0.0/16|^172.16.0.0/12|^10.0.0.0/8" /tmp/bogons > /etc/bogons
/etc/rc.conf_mount_ro
/sbin/pfctl -t bogons -T replace -f /etc/bogons
OpenPOWER on IntegriCloud