summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbcyrill <cyrill@bannwart.info>2013-01-06 23:59:54 +0100
committerbcyrill <cyrill@bannwart.info>2013-01-06 23:59:54 +0100
commit6b4480dc8486db7220928ca7f7341e8134e33d50 (patch)
tree6d29f042ef2406343118a33a6ebf3d14619e47c0
parent149ed85efbac496269273971b572653ad95e0faf (diff)
downloadpfsense-6b4480dc8486db7220928ca7f7341e8134e33d50.zip
pfsense-6b4480dc8486db7220928ca7f7341e8134e33d50.tar.gz
Add bogons update frequency selection
-rw-r--r--conf.default/config.xml3
-rwxr-xr-xusr/local/www/interfaces.php2
-rw-r--r--usr/local/www/system_advanced_firewall.php35
3 files changed, 40 insertions, 0 deletions
diff --git a/conf.default/config.xml b/conf.default/config.xml
index df266f0..fb5c7be 100644
--- a/conf.default/config.xml
+++ b/conf.default/config.xml
@@ -194,6 +194,9 @@
<disablelargereceiveoffloading/>
<ipv6allow/>
<powerd_mode>hadp</powerd_mode>
+ <bogons>
+ <interval>monthly</interval>
+ </bogons>
</system>
<interfaces>
<wan>
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index 7d14829..c4c127b 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."); ?>&nbsp;&nbsp;
<?=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."); ?>
+ <br/><br/>
+ <?=gettext("Note: The update frequency can be changed under System->Advanced Firewall/NAT settings.")?>
</td>
</tr>
</table> <!-- End "allcfg" table -->
diff --git a/usr/local/www/system_advanced_firewall.php b/usr/local/www/system_advanced_firewall.php
index db0aaa4..e65581e 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) {
<tr>
<td colspan="2" class="list" height="12">&nbsp;</td>
</tr>
+ <tr>
+ <td colspan="2" valign="top" class="listtopic"><?=gettext("Bogon Networks");?></td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Update Frequency");?></td>
+ <td width="78%" class="vtable">
+ <select name="bogonsinterval" class="formselect">
+ <option value="monthly" <?php if (empty($pconfig['bogonsinterval']) || $pconfig['bogonsinterval'] == 'monthly') echo "selected"; ?>><?=gettext("Monthly"); ?></option>
+ <option value="weekly" <?php if ($pconfig['bogonsinterval'] == 'weekly') echo "selected"; ?>><?=gettext("Weekly"); ?></option>
+ <option value="daily" <?php if ($pconfig['bogonsinterval'] == 'daily') echo "selected"; ?>><?=gettext("Daily"); ?></option>
+ </select>
+ <br/>
+ <?=gettext("The frequency of updating the lists of IP addresses that are reserved (but not RFC 1918) or not yet assigned by IANA.");?>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" class="list" height="12">&nbsp;</td>
+ </tr>
<?php if(count($config['interfaces']) > 1): ?>
<tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Network Address Translation");?></td>
OpenPOWER on IntegriCloud