diff --git a/conf.default/config.xml b/conf.default/config.xml
index df266f0630..fb5c7be790 100644
--- a/conf.default/config.xml
+++ b/conf.default/config.xml
@@ -194,6 +194,9 @@
hadp
+
+ monthly
+
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index 7d14829767..c4c127bbe1 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -2619,6 +2619,8 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
"(but not RFC 1918) or not yet assigned by IANA."); ?>
=gettext("Bogons are prefixes that should never appear in the Internet routing table, " .
"and obviously should not appear as the source address in any packets you receive."); ?>
+
+ =gettext("Note: The update frequency can be changed under System->Advanced Firewall/NAT settings.")?>
diff --git a/usr/local/www/system_advanced_firewall.php b/usr/local/www/system_advanced_firewall.php
index db0aaa4741..e65581ed5f 100644
--- a/usr/local/www/system_advanced_firewall.php
+++ b/usr/local/www/system_advanced_firewall.php
@@ -59,6 +59,7 @@ $pconfig['maximumtables'] = $config['system']['maximumtables'];
$pconfig['maximumtableentries'] = $config['system']['maximumtableentries'];
$pconfig['disablereplyto'] = isset($config['system']['disablereplyto']);
$pconfig['disablenegate'] = isset($config['system']['disablenegate']);
+$pconfig['bogonsinterval'] = $config['system']['bogons']['interval'];
$pconfig['disablenatreflection'] = $config['system']['disablenatreflection'];
$pconfig['enablebinatreflection'] = $config['system']['enablebinatreflection'];
$pconfig['reflectiontimeout'] = $config['system']['reflectiontimeout'];
@@ -170,6 +171,22 @@ if ($_POST) {
$config['system']['tftpinterface'] = implode(",", $_POST['tftpinterface']);
else
unset($config['system']['tftpinterface']);
+
+ if ($_POST['bogonsinterval'] != $config['system']['bogons']['interval']) {
+ switch ($_POST['bogonsinterval']) {
+ case 'daily':
+ install_cron_job("/usr/bin/nice -n20 /etc/rc.update_bogons.sh", true, "1", "3", "*", "*", "*");
+ break;
+ case 'weekly':
+ install_cron_job("/usr/bin/nice -n20 /etc/rc.update_bogons.sh", true, "1", "3", "*", "*", "1");
+ break;
+ case 'monthly':
+ // fall through
+ default:
+ install_cron_job("/usr/bin/nice -n20 /etc/rc.update_bogons.sh", true, "1", "3", "1", "*", "*");
+ }
+ $config['system']['bogons']['interval'] = $_POST['bogonsinterval'];
+ }
write_config();
@@ -392,6 +409,24 @@ function update_description(itemnum) {
+
+
=gettext("Bogon Networks");?>
+
+
+
=gettext("Update Frequency");?>
+
+
+
+ =gettext("The frequency of updating the lists of IP addresses that are reserved (but not RFC 1918) or not yet assigned by IANA.");?>
+