mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
* 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
This commit is contained in:
parent
f0dbab251c
commit
528ec8dbab
@ -554,7 +554,7 @@
|
||||
</item>
|
||||
<item>
|
||||
<minute>1</minute>
|
||||
<hour>*</hour>
|
||||
<hour>1</hour>
|
||||
<mday>1</mday>
|
||||
<month>*</month>
|
||||
<wday>*</wday>
|
||||
|
||||
@ -545,7 +545,7 @@
|
||||
</item>
|
||||
<item>
|
||||
<minute>1</minute>
|
||||
<hour>*</hour>
|
||||
<hour>1</hour>
|
||||
<mday>1</mday>
|
||||
<month>*</month>
|
||||
<wday>*</wday>
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user