summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-11-27 20:28:36 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-11-27 20:28:36 +0000
commit528ec8dbab5cb14aa8f41c1b84abefcdff59fecb (patch)
treea70a407c924649632063bfc57a09d4e7d7ea6a43
parentf0dbab251c6cb1a76c3e850f2b98e13be68d92e9 (diff)
downloadpfsense-528ec8dbab5cb14aa8f41c1b84abefcdff59fecb.zip
pfsense-528ec8dbab5cb14aa8f41c1b84abefcdff59fecb.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
-rw-r--r--cf/conf/config.xml2
-rw-r--r--conf.default/config.xml2
-rwxr-xr-xetc/rc.update_bogons.sh12
3 files changed, 13 insertions, 3 deletions
diff --git a/cf/conf/config.xml b/cf/conf/config.xml
index eb008cb..fafa419 100644
--- a/cf/conf/config.xml
+++ b/cf/conf/config.xml
@@ -554,7 +554,7 @@
</item>
<item>
<minute>1</minute>
- <hour>*</hour>
+ <hour>1</hour>
<mday>1</mday>
<month>*</month>
<wday>*</wday>
diff --git a/conf.default/config.xml b/conf.default/config.xml
index 90b396d..9b133d4 100644
--- a/conf.default/config.xml
+++ b/conf.default/config.xml
@@ -545,7 +545,7 @@
</item>
<item>
<minute>1</minute>
- <hour>*</hour>
+ <hour>1</hour>
<mday>1</mday>
<month>*</month>
<wday>*</wday>
diff --git a/etc/rc.update_bogons.sh b/etc/rc.update_bogons.sh
index 562c79b..d94fd9a 100755
--- a/etc/rc.update_bogons.sh
+++ b/etc/rc.update_bogons.sh
@@ -4,8 +4,18 @@
# 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