Commit 6a2b3ad4 authored by Ad Schellevis's avatar Ad Schellevis

(legacy) refactor system_advanced_firewall.php

parent 41c79bfc
...@@ -42,171 +42,167 @@ function default_table_entries_size() ...@@ -42,171 +42,167 @@ function default_table_entries_size()
} }
$pconfig['disablefilter'] = $config['system']['disablefilter']; if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig['rfc959workaround'] = $config['system']['rfc959workaround']; $pconfig = array();
$pconfig['scrubnodf'] = $config['system']['scrubnodf']; $pconfig['disablefilter'] = !empty($config['system']['disablefilter']);
$pconfig['scrubrnid'] = $config['system']['scrubrnid']; $pconfig['scrubnodf'] = !empty($config['system']['scrubnodf']);
$pconfig['tcpidletimeout'] = $config['filter']['tcpidletimeout']; $pconfig['scrubrnid'] = !empty($config['system']['scrubrnid']);
$pconfig['optimization'] = $config['filter']['optimization']; $pconfig['optimization'] = isset($config['system']['optimization']) ? $config['system']['optimization'] : "normal";
$pconfig['adaptivestart'] = $config['system']['adaptivestart']; $pconfig['maximumstates'] = isset($config['system']['maximumstates']) ? $config['system']['maximumstates'] : null;
$pconfig['adaptiveend'] = $config['system']['adaptiveend']; $pconfig['adaptivestart'] = isset($config['system']['adaptivestart']) ? $config['system']['adaptivestart'] : null;
$pconfig['maximumstates'] = $config['system']['maximumstates']; $pconfig['adaptiveend'] = isset($config['system']['adaptiveend']) ? $config['system']['adaptiveend'] : null;
$pconfig['aliasesresolveinterval'] = $config['system']['aliasesresolveinterval']; $pconfig['aliasesresolveinterval'] = isset($config['system']['aliasesresolveinterval']) ? $config['system']['aliasesresolveinterval'] : null;
$old_aliasesresolveinterval = $config['system']['aliasesresolveinterval']; $pconfig['checkaliasesurlcert'] = isset($config['system']['checkaliasesurlcert']);
$pconfig['checkaliasesurlcert'] = isset($config['system']['checkaliasesurlcert']); $pconfig['maximumtableentries'] = !empty($config['system']['maximumtableentries']) ? $config['system']['maximumtableentries'] : null ;
$pconfig['maximumtableentries'] = $config['system']['maximumtableentries']; $pconfig['disablereplyto'] = isset($config['system']['disablereplyto']);
$pconfig['disablereplyto'] = isset($config['system']['disablereplyto']); $pconfig['disablenegate'] = isset($config['system']['disablenegate']);
$pconfig['disablenegate'] = isset($config['system']['disablenegate']); $pconfig['bogonsinterval'] = !empty($config['system']['bogons']['interval']) ? $config['system']['bogons']['interval'] : null;
$pconfig['bogonsinterval'] = $config['system']['bogons']['interval']; if (!isset($config['system']['disablenatreflection']) && !isset($config['system']['enablenatreflectionpurenat'])) {
$pconfig['disablenatreflection'] = $config['system']['disablenatreflection']; $pconfig['natreflection'] = "proxy";
$pconfig['enablebinatreflection'] = $config['system']['enablebinatreflection']; } elseif (isset($config['system']['enablenatreflectionpurenat'])) {
$pconfig['reflectiontimeout'] = $config['system']['reflectiontimeout']; $pconfig['natreflection'] = "purenat";
$pconfig['bypassstaticroutes'] = isset($config['filter']['bypassstaticroutes']); } else {
$pconfig['disablescrub'] = isset($config['system']['disablescrub']); $pconfig['natreflection'] = "disable";
$pconfig['ftp-proxy-client'] = isset($config['system']['ftp-proxy']['client']); }
$pconfig['disablevpnrules'] = isset($config['system']['disablevpnrules']); $pconfig['enablebinatreflection'] = !empty($config['system']['enablebinatreflection']);
$pconfig['enablenatreflectionhelper'] = isset($config['system']['enablenatreflectionhelper']) ? $config['system']['enablenatreflectionhelper'] : null;
if ($_POST) { $pconfig['reflectiontimeout'] = !empty($config['system']['reflectiontimeout']) ? $config['system']['reflectiontimeout'] : null;
unset($input_errors); $pconfig['bypassstaticroutes'] = isset($config['filter']['bypassstaticroutes']);
$pconfig['disablescrub'] = isset($config['system']['disablescrub']);
$pconfig['ftp-proxy-client'] = isset($config['system']['ftp-proxy']['client']);
$pconfig['disablevpnrules'] = isset($config['system']['disablevpnrules']);
} elseif ($_SERVER['REQUEST_METHOD'] === 'POST') {
$pconfig = $_POST; $pconfig = $_POST;
$old_aliasesresolveinterval = $config['system']['aliasesresolveinterval'];
$input_errors = array();
/* input validation */ /* input validation */
if ((empty($_POST['adaptivestart']) && !empty($_POST['adaptiveend'])) || (!empty($_POST['adaptivestart']) && empty($_POST['adaptiveend']))) { if ((empty($pconfig['adaptivestart']) && !empty($pconfig['adaptiveend'])) || (!empty($pconfig['adaptivestart']) && empty($pconfig['adaptiveend']))) {
$input_errors[] = gettext("The Firewall Adaptive values must be set together."); $input_errors[] = gettext("The Firewall Adaptive values must be set together.");
} }
if (!empty($_POST['adaptivestart']) && !is_numericint($_POST['adaptivestart'])) { if (!empty($pconfig['adaptivestart']) && !is_numericint($pconfig['adaptivestart'])) {
$input_errors[] = gettext("The Firewall Adaptive Start value must be an integer."); $input_errors[] = gettext("The Firewall Adaptive Start value must be an integer.");
} }
if (!empty($_POST['adaptiveend']) && !is_numericint($_POST['adaptiveend'])) { if (!empty($pconfig['adaptiveend']) && !is_numericint($pconfig['adaptiveend'])) {
$input_errors[] = gettext("The Firewall Adaptive End value must be an integer."); $input_errors[] = gettext("The Firewall Adaptive End value must be an integer.");
} }
if ($_POST['maximumstates'] && !is_numericint($_POST['maximumstates'])) { if (!empty($pconfig['maximumstates']) && !is_numericint($pconfig['maximumstates'])) {
$input_errors[] = gettext("The Firewall Maximum States value must be an integer."); $input_errors[] = gettext("The Firewall Maximum States value must be an integer.");
} }
if ($_POST['aliasesresolveinterval'] && !is_numericint($_POST['aliasesresolveinterval'])) { if (!empty($pconfig['aliasesresolveinterval']) && !is_numericint($pconfig['aliasesresolveinterval'])) {
$input_errors[] = gettext("The Aliases Hostname Resolve Interval value must be an integer."); $input_errors[] = gettext("The Aliases Hostname Resolve Interval value must be an integer.");
} }
if ($_POST['maximumtableentries'] && !is_numericint($_POST['maximumtableentries'])) { if (!empty($pconfig['maximumtableentries']) && !is_numericint($pconfig['maximumtableentries'])) {
$input_errors[] = gettext("The Firewall Maximum Table Entries value must be an integer."); $input_errors[] = gettext("The Firewall Maximum Table Entries value must be an integer.");
} }
if ($_POST['tcpidletimeout'] && !is_numericint($_POST['tcpidletimeout'])) { if (!empty($pconfig['reflectiontimeout']) && !is_numericint($pconfig['reflectiontimeout'])) {
$input_errors[] = gettext("The TCP idle timeout must be an integer.");
}
if ($_POST['reflectiontimeout'] && !is_numericint($_POST['reflectiontimeout'])) {
$input_errors[] = gettext("The Reflection timeout must be an integer."); $input_errors[] = gettext("The Reflection timeout must be an integer.");
} }
if (count($input_errors) == 0) {
ob_flush(); if (!empty($pconfig['disablefilter'])) {
flush();
if (!$input_errors) {
if ($_POST['disablefilter'] == "yes") {
$config['system']['disablefilter'] = "enabled"; $config['system']['disablefilter'] = "enabled";
} else { } elseif (isset($config['system']['disablefilter'])) {
unset($config['system']['disablefilter']); unset($config['system']['disablefilter']);
} }
if ($_POST['disablevpnrules'] == "yes") { if (!empty($pconfig['disablevpnrules'])) {
$config['system']['disablevpnrules'] = true; $config['system']['disablevpnrules'] = true;
} else { } elseif (isset($config['system']['disablevpnrules'])) {
unset($config['system']['disablevpnrules']); unset($config['system']['disablevpnrules']);
} }
if ($_POST['rfc959workaround'] == "yes") {
$config['system']['rfc959workaround'] = "enabled";
} else {
unset($config['system']['rfc959workaround']);
}
if ($_POST['scrubnodf'] == "yes") { if (!empty($pconfig['scrubnodf'])) {
$config['system']['scrubnodf'] = "enabled"; $config['system']['scrubnodf'] = "enabled";
} else { } elseif (isset($config['system']['scrubnodf'])) {
unset($config['system']['scrubnodf']); unset($config['system']['scrubnodf']);
} }
if ($_POST['scrubrnid'] == "yes") { if (!empty($pconfig['scrubrnid'])) {
$config['system']['scrubrnid'] = "enabled"; $config['system']['scrubrnid'] = "enabled";
} else { } elseif (isset($config['system']['scrubrnid'])) {
unset($config['system']['scrubrnid']); unset($config['system']['scrubrnid']);
} }
if (!empty($_POST['adaptiveend'])) { if (!empty($pconfig['adaptiveend'])) {
$config['system']['adaptiveend'] = $_POST['adaptiveend']; $config['system']['adaptiveend'] = $pconfig['adaptiveend'];
} else { } elseif (isset($config['system']['adaptiveend'])) {
unset($config['system']['adaptiveend']); unset($config['system']['adaptiveend']);
} }
if (!empty($_POST['adaptivestart'])) { if (!empty($pconfig['adaptivestart'])) {
$config['system']['adaptivestart'] = $_POST['adaptivestart']; $config['system']['adaptivestart'] = $pconfig['adaptivestart'];
} else { } elseif (isset($config['system']['adaptivestart'])) {
unset($config['system']['adaptivestart']); unset($config['system']['adaptivestart']);
} }
if ($_POST['checkaliasesurlcert'] == "yes") { if (!empty($pconfig['checkaliasesurlcert'])) {
$config['system']['checkaliasesurlcert'] = true; $config['system']['checkaliasesurlcert'] = true;
} else { } elseif (isset($config['system']['checkaliasesurlcert'])) {
unset($config['system']['checkaliasesurlcert']); unset($config['system']['checkaliasesurlcert']);
} }
$config['system']['optimization'] = $_POST['optimization']; if ($pconfig['natreflection'] == "proxy") {
$config['system']['maximumstates'] = $_POST['maximumstates'];
$config['system']['aliasesresolveinterval'] = $_POST['aliasesresolveinterval'];
$config['system']['maximumtableentries'] = $_POST['maximumtableentries'];
if ($_POST['natreflection'] == "proxy") {
unset($config['system']['disablenatreflection']); unset($config['system']['disablenatreflection']);
unset($config['system']['enablenatreflectionpurenat']); unset($config['system']['enablenatreflectionpurenat']);
} elseif ($_POST['natreflection'] == "purenat") { } elseif ($pconfig['natreflection'] == "purenat") {
unset($config['system']['disablenatreflection']); unset($config['system']['disablenatreflection']);
$config['system']['enablenatreflectionpurenat'] = "yes"; $config['system']['enablenatreflectionpurenat'] = "yes";
} else { } else {
$config['system']['disablenatreflection'] = "yes"; $config['system']['disablenatreflection'] = "yes";
if (isset($config['system']['enablenatreflectionpurenat'])) {
unset($config['system']['enablenatreflectionpurenat']); unset($config['system']['enablenatreflectionpurenat']);
} }
}
if ($_POST['enablebinatreflection'] == "yes") { if (!empty($pconfig['enablebinatreflection'])) {
$config['system']['enablebinatreflection'] = "yes"; $config['system']['enablebinatreflection'] = "yes";
} else { } elseif (isset($config['system']['enablebinatreflection'])) {
unset($config['system']['enablebinatreflection']); unset($config['system']['enablebinatreflection']);
} }
if ($_POST['disablereplyto'] == "yes") { if (!empty($pconfig['disablereplyto'])) {
$config['system']['disablereplyto'] = $_POST['disablereplyto']; $config['system']['disablereplyto'] = $pconfig['disablereplyto'];
} else { } elseif (isset($config['system']['disablereplyto'])) {
unset($config['system']['disablereplyto']); unset($config['system']['disablereplyto']);
} }
if ($_POST['disablenegate'] == "yes") { if (!empty($pconfig['disablenegate'])) {
$config['system']['disablenegate'] = $_POST['disablenegate']; $config['system']['disablenegate'] = $pconfig['disablenegate'];
} else { } elseif (isset($config['system']['disablenegate'])) {
unset($config['system']['disablenegate']); unset($config['system']['disablenegate']);
} }
if ($_POST['enablenatreflectionhelper'] == "yes") { if (!empty($pconfig['enablenatreflectionhelper'])) {
$config['system']['enablenatreflectionhelper'] = "yes"; $config['system']['enablenatreflectionhelper'] = "yes";
} else { } elseif (isset($config['system']['enablenatreflectionhelper'])) {
unset($config['system']['enablenatreflectionhelper']); unset($config['system']['enablenatreflectionhelper']);
} }
$config['system']['reflectiontimeout'] = $_POST['reflectiontimeout']; $config['system']['optimization'] = $pconfig['optimization'];
$config['system']['maximumstates'] = $pconfig['maximumstates'];
$config['system']['aliasesresolveinterval'] = $pconfig['aliasesresolveinterval'];
$config['system']['maximumtableentries'] = $pconfig['maximumtableentries'];
$config['system']['reflectiontimeout'] = $pconfig['reflectiontimeout'];
if ($_POST['bypassstaticroutes'] == "yes") { if (!empty($pconfig['bypassstaticroutes'])) {
$config['filter']['bypassstaticroutes'] = $_POST['bypassstaticroutes']; $config['filter']['bypassstaticroutes'] = $pconfig['bypassstaticroutes'];
} elseif (isset($config['filter']['bypassstaticroutes'])) } elseif (isset($config['filter']['bypassstaticroutes'])) {
unset($config['filter']['bypassstaticroutes']); unset($config['filter']['bypassstaticroutes']);
}
if ($_POST['disablescrub'] == "yes") { if (!empty($pconfig['disablescrub'])) {
$config['system']['disablescrub'] = $_POST['disablescrub']; $config['system']['disablescrub'] = $pconfig['disablescrub'];
} else { } elseif (isset($config['system']['disablescrub'])) {
unset($config['system']['disablescrub']); unset($config['system']['disablescrub']);
} }
if ($_POST['ftp-proxy-client'] == 'yes') { if (!empty($pconfig['ftp-proxy-client'])) {
$config['system']['ftp-proxy']['client'] = true; $config['system']['ftp-proxy']['client'] = true;
} else { } elseif (isset($config['system']['ftp-proxy']['client'])) {
unset($config['system']['ftp-proxy']['client']); unset($config['system']['ftp-proxy']['client']);
} }
if ($_POST['bogonsinterval'] != $config['system']['bogons']['interval']) { if ($pconfig['bogonsinterval'] != $config['system']['bogons']['interval']) {
switch ($_POST['bogonsinterval']) { switch ($pconfig['bogonsinterval']) {
case 'daily': case 'daily':
install_cron_job("/usr/local/etc/rc.update_bogons", true, "1", "3", "*", "*", "*"); install_cron_job("/usr/local/etc/rc.update_bogons", true, "1", "3", "*", "*", "*");
break; break;
...@@ -218,7 +214,7 @@ if ($_POST) { ...@@ -218,7 +214,7 @@ if ($_POST) {
default: default:
install_cron_job("/usr/local/etc/rc.update_bogons", true, "1", "3", "1", "*", "*"); install_cron_job("/usr/local/etc/rc.update_bogons", true, "1", "3", "1", "*", "*");
} }
$config['system']['bogons']['interval'] = $_POST['bogonsinterval']; $config['system']['bogons']['interval'] = $pconfig['bogonsinterval'];
} }
write_config(); write_config();
...@@ -238,309 +234,299 @@ if ($_POST) { ...@@ -238,309 +234,299 @@ if ($_POST) {
} }
} }
legacy_html_escape_form_data($pconfig);
$pgtitle = array(gettext("System"),gettext("Settings"),gettext("Firewall and NAT")); $pgtitle = array(gettext("System"),gettext("Settings"),gettext("Firewall and NAT"));
include("head.inc"); include("head.inc");
?> ?>
<body> <body>
<?php include("fbegin.inc"); ?>
<?php include("fbegin.inc"); ?> <!-- row -->
<script type="text/javascript">
//<![CDATA[
var descs=new Array(5);
descs[0]="<?=gettext("as the name says, it is the normal optimization algorithm");?>";
descs[1]="<?=gettext("used for high latency links, such as satellite links. Expires idle connections later than default");?>";
descs[2]="<?=gettext("expires idle connections quicker. More efficient use of CPU and memory but can drop legitimate idle connections");?>";
descs[3]="<?=gettext("tries to avoid dropping any legitimate idle connections at the expense of increased memory usage and CPU utilization.");?>";
function update_description(itemnum) {
document.iform.info.value=descs[itemnum];
}
//]]>
</script>
<!-- row -->
<section class="page-content-main"> <section class="page-content-main">
<div class="container-fluid"> <div class="container-fluid">
<div class="row"> <div class="row">
<?php <?php
if (isset($input_errors) && count($input_errors) > 0) { if (isset($input_errors) && count($input_errors) > 0) {
print_input_errors($input_errors); print_input_errors($input_errors);
} }
if (isset($savemsg)) { if (isset($savemsg)) {
print_info_box($savemsg); print_info_box($savemsg);
} }
?> ?>
<section class="col-xs-12"> <section class="col-xs-12">
<div class="content-box tab-content"> <div class="content-box tab-content table-responsive">
<form action="system_advanced_firewall.php" method="post" name="iform" id="iform"> <form action="system_advanced_firewall.php" method="post" name="iform" id="iform">
<table class="table table-striped ">
<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area" class="table table-striped ">
<thead>
<tr> <tr>
<th colspan="2" valign="top" class="listtopic"><?=gettext("Firewall Advanced");?></th> <td width="22%"><strong><?=gettext("Firewall Advanced");?></strong></td>
<td width="78%" align="right">
<small><?=gettext("full help"); ?> </small>
<i class="fa fa-toggle-off text-danger" style="cursor: pointer;" id="show_all_help_page" type="button"></i></a>
</td>
</tr> </tr>
</thead>
<tbody>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("IP Do-Not-Fragment compatibility");?></td> <td><a id="help_for_scrubnodf" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("IP Do-Not-Fragment");?></td>
<td width="78%" class="vtable"> <td>
<input name="scrubnodf" type="checkbox" id="scrubnodf" value="yes" <?php if (isset($config['system']['scrubnodf'])) { <input name="scrubnodf" type="checkbox" value="yes" <?=!empty($pconfig['scrubnodf']) ? "checked=\"checked\"" : ""; ?>/>
echo "checked=\"checked\""; <div class="hidden" for="help_for_scrubnodf">
} ?> />
<strong><?=gettext("Clear invalid DF bits instead of dropping the packets");?></strong><br /> <strong><?=gettext("Clear invalid DF bits instead of dropping the packets");?></strong><br />
<?=gettext("This allows for communications with hosts that generate fragmented " . <?=gettext("This allows for communications with hosts that generate fragmented " .
"packets with the don't fragment (DF) bit set. Linux NFS is known to " . "packets with the don't fragment (DF) bit set. Linux NFS is known to " .
"do this. This will cause the filter to not drop such packets but " . "do this. This will cause the filter to not drop such packets but " .
"instead clear the don't fragment bit.");?> "instead clear the don't fragment bit.");?>
</div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("IP Random id generation");?></td> <td><a id="help_for_scrubrnid" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("IP Random id");?></td>
<td width="78%" class="vtable"> <td>
<input name="scrubrnid" type="checkbox" id="scrubrnid" value="yes" <?php if (isset($config['system']['scrubrnid'])) { <input name="scrubrnid" type="checkbox" value="yes" <?= !empty($pconfig['scrubrnid']) ? "checked=\"checked\"" : "";?> />
echo "checked=\"checked\""; <div class="hidden" for="help_for_scrubrnid">
} ?> />
<strong><?=gettext("Insert a stronger id into IP header of packets passing through the filter.");?></strong><br /> <strong><?=gettext("Insert a stronger id into IP header of packets passing through the filter.");?></strong><br />
<?=gettext("Replaces the IP identification field of packets with random values to " . <?=gettext("Replaces the IP identification field of packets with random values to " .
"compensate for operating systems that use predictable values. " . "compensate for operating systems that use predictable values. " .
"This option only applies to packets that are not fragmented after the " . "This option only applies to packets that are not fragmented after the " .
"optional packet reassembly.");?> "optional packet reassembly.");?>
</div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Firewall Optimization Options");?></td> <td><a id="help_for_optimization" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Firewall Optimization");?></td>
<td width="78%" class="vtable"> <td>
<select onchange="update_description(this.selectedIndex);" name="optimization" id="optimization" class="selectpicker" data-style="btn-default"> <select onchange="update_description(this.selectedIndex);" name="optimization" id="optimization" class="selectpicker" data-style="btn-default">
<option value="normal"<?php if ($config['system']['optimization']=="normal") { <option value="normal"<?=$pconfig['optimization']=="normal" ? " selected=\"selected\"" : ""; ?>>
echo " selected=\"selected\""; <?=gettext("normal");?>
</option>
} ?>><?=gettext("normal");?></option> <option value="high-latency"<?=$pconfig['optimization']=="high-latency" ? " selected=\"selected\"" : ""; ?>>
<option value="high-latency"<?php if ($config['system']['optimization']=="high-latency") { <?=gettext("high-latency");?>
echo " selected=\"selected\""; </option>
<option value="aggressive"<?=$pconfig['optimization']=="aggressive" ? " selected=\"selected\"" : ""; ?>>
} ?>><?=gettext("high-latency");?></option> <?=gettext("aggressive");?>
<option value="aggressive"<?php if ($config['system']['optimization']=="aggressive") { </option>
echo " selected=\"selected\""; <option value="conservative"<?=$pconfig['optimization']=="conservative" ? " selected=\"selected\"" : ""; ?>>
<?=gettext("conservative");?>
} ?>><?=gettext("aggressive");?></option> </option>
<option value="conservative"<?php if ($config['system']['optimization']=="conservative") {
echo " selected=\"selected\"";
} ?>><?=gettext("conservative");?></option>
</select> </select>
<br /> <div class="hidden" for="help_for_optimization">
<textarea readonly="readonly" cols="60" rows="2" id="info" name="info"></textarea>
<script type="text/javascript">
//<![CDATA[
update_description(document.iform.optimization.selectedIndex);
//]]>
</script>
<br />
<?=gettext("Select the type of state table optimization to use");?> <?=gettext("Select the type of state table optimization to use");?>
<table class="table table-condensed">
<tr>
<td><strong><?=gettext("normal");?></strong></td>
<td><?=gettext("as the name says, it is the normal optimization algorithm");?></td>
</tr>
<tr>
<td><strong><?=gettext("high-latency");?></strong></td>
<td><?=gettext("used for high latency links, such as satellite links. Expires idle connections later than default");?></td>
</tr>
<tr>
<td><strong><?=gettext("aggressive");?></strong></td>
<td><?=gettext("expires idle connections quicker. More efficient use of CPU and memory but can drop legitimate idle connections");?></td>
</tr>
<tr>
<td><strong><?=gettext("conservative");?></strong></td>
<td><?=gettext("tries to avoid dropping any legitimate idle connections at the expense of increased memory usage and CPU utilization.");?></td>
</tr>
</table>
<hr/>
</div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Disable Firewall");?></td> <td><a id="help_for_disablefilter" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Disable Firewall");?></td>
<td width="78%" class="vtable"> <td>
<input name="disablefilter" type="checkbox" id="disablefilter" value="yes" <?php if (isset($config['system']['disablefilter'])) { <input name="disablefilter" type="checkbox" value="yes" <?= !empty($pconfig['disablefilter']) ? "checked=\"checked\"" : "";?>/>
echo "checked=\"checked\""; <div class="hidden" for="help_for_disablefilter">
} ?> /> <strong><?=gettext("Disable all packet filtering.");?></strong><br/>
<strong><?=gettext("Disable all packet filtering.");?></strong> <?php printf(gettext("Warning: This converts %s into a routing only platform!"), $g['product_name']);?>
<br />
<span class="vexpl"><?php printf(gettext("Warning: This converts %s into a routing only platform!"), $g['product_name']);?><br />
<?=gettext("Warning: This will also turn off NAT!");?><br /> <?=gettext("Warning: This will also turn off NAT!");?><br />
<?=sprintf( <?=sprintf(
gettext('If you only want to disable NAT, and not firewall rules, visit the %sOutbound NAT%s page.'), gettext('If you only want to disable NAT, and not firewall rules, visit the %sOutbound NAT%s page.'),
'<a href="/firewall_nat_out.php">', '</a>' '<a href="/firewall_nat_out.php">', '</a>'
)?> )?>
</span> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Disable Firewall Scrub");?></td> <td><a id="help_for_disablescrub" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Disable Firewall Scrub");?></td>
<td width="78%" class="vtable"> <td>
<input name="disablescrub" type="checkbox" id="disablescrub" value="yes" <?php if (isset($config['system']['disablescrub'])) { <input name="disablescrub" type="checkbox" value="yes" <?=!empty($pconfig['disablescrub']) ? "checked=\"checked\"" : "";?>/>
echo "checked=\"checked\""; <div class="hidden" for="help_for_disablescrub">
} ?> /> <?=gettext("Disables the PF scrubbing option which can sometimes interfere with NFS and PPTP traffic.");?>
<strong><?=gettext("Disables the PF scrubbing option which can sometimes interfere with NFS and PPTP traffic.");?></strong> </div>
<br />
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Firewall Adaptive Timeouts");?></td> <td><a id="help_for_adaptive" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Firewall Adaptive Timeouts");?></td>
<td width="78%" class="vtable"> <td>
<table class="table table-condensed">
<thead>
<tr>
<td><?=gettext("start");?></td>
<td><?=gettext("end");?></td>
</tr>
</thead>
<tbody>
<tr>
<td>
<input name="adaptivestart" type="text" value="<?=$pconfig['adaptivestart']; ?>" />
</td>
<td>
<input name="adaptiveend" type="text" value="<?=$pconfig['adaptiveend']; ?>" />
</td>
</tr>
</tbody>
</table>
<div class="hidden" for="help_for_adaptive">
<strong><?=gettext("Timeouts for states can be scaled adaptively as the number of state table entries grows.");?></strong> <strong><?=gettext("Timeouts for states can be scaled adaptively as the number of state table entries grows.");?></strong>
<br /> <br />
<input name="adaptivestart" type="text" id="adaptivestart" value="<?php echo $pconfig['adaptivestart']; ?>" /> <strong><?=gettext("start");?></strong></br>
<br /><?=gettext("When the number of state entries exceeds this value, adaptive scaling begins. All timeout values are scaled linearly with factor (adaptive.end - number of states) / (adaptive.end - adaptive.start).");?> <?=gettext("When the number of state entries exceeds this value, adaptive scaling begins. All timeout values are scaled linearly with factor (adaptive.end - number of states) / (adaptive.end - adaptive.start).");?><br/>
<strong><?=gettext("end");?></strong></br>
<br /> <?=gettext("When reaching this number of state entries, all timeout values become zero, effectively purging all state entries immediately. This value is used to define the scale factor, it should not actually be reached (set a lower state limit, see below).");?>
<input name="adaptiveend" type="text" id="adaptiveend" value="<?php echo $pconfig['adaptiveend']; ?>" /> <br/>
<br /><?=gettext("When reaching this number of state entries, all timeout values become zero, effectively purging all state entries immediately. This value is used to define the scale factor, it should not actually be reached (set a lower state limit, see below).");?> <strong><?=gettext("Note: Leave this blank for the default(0).");?></strong>
<br /> </div>
<span class="vexpl"><?=gettext("Note: Leave this blank for the default(0).");?></span>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Firewall Maximum States");?></td> <td><a id="help_for_maximumstates" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Firewall Maximum States");?></td>
<td width="78%" class="vtable"> <td>
<input name="maximumstates" type="text" id="maximumstates" value="<?php echo $pconfig['maximumstates']; ?>" /> <input name="maximumstates" type="text" id="maximumstates" value="<?=$pconfig['maximumstates'];?>" />
<br /> <div class="hidden" for="help_for_maximumstates">
<strong><?=gettext("Maximum number of connections to hold in the firewall state table.");?></strong> <strong><?=gettext("Maximum number of connections to hold in the firewall state table.");?></strong>
<br /> <br />
<span class="vexpl"><?=gettext("Note: Leave this blank for the default. On your system the default size is:");?> <?= default_state_size() ?></span> <?=gettext("Note: Leave this blank for the default. On your system the default size is:");?> <?= default_state_size() ?>
</div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Firewall Maximum Table Entries");?></td> <td><a id="help_for_maximumtableentries" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Firewall Maximum Table Entries");?></td>
<td width="78%" class="vtable"> <td>
<input name="maximumtableentries" type="text" id="maximumtableentries" value="<?php echo $pconfig['maximumtableentries']; ?>" /> <input name="maximumtableentries" type="text" id="maximumtableentries" value="<?php echo $pconfig['maximumtableentries']; ?>" />
<br /> <div class="hidden" for="help_for_maximumtableentries">
<strong><?=gettext("Maximum number of table entries for systems such as aliases, sshlockout, snort, etc, combined.");?></strong> <strong><?=gettext("Maximum number of table entries for systems such as aliases, sshlockout, snort, etc, combined.");?></strong>
<br /> <br />
<span class="vexpl">
<?=gettext("Note: Leave this blank for the default.");?> <?=gettext("Note: Leave this blank for the default.");?>
<?php if (empty($pconfig['maximumtableentries'])) : <?php
?> if (empty($pconfig['maximumtableentries'])) :?>
<?= gettext("On your system the default size is:"); <?= gettext("On your system the default size is:");?> <?= default_table_entries_size(); ?>
?> <?= default_table_entries_size(); ?> <?php
<?php endif;?>
endif; ?> </div>
</span>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Static route filtering");?></td> <td><a id="help_for_bypassstaticroutes" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Static route filtering");?></td>
<td width="78%" class="vtable"> <td>
<input name="bypassstaticroutes" type="checkbox" id="bypassstaticroutes" value="yes" <?php if ($pconfig['bypassstaticroutes']) { <input name="bypassstaticroutes" type="checkbox" value="yes" <?=!empty($pconfig['bypassstaticroutes']) ? "checked=\"checked\"" : "";?>/>
echo "checked=\"checked\""; <div class="hidden" for="help_for_bypassstaticroutes">
} ?> />
<strong><?=gettext("Bypass firewall rules for traffic on the same interface");?></strong> <strong><?=gettext("Bypass firewall rules for traffic on the same interface");?></strong>
<br /> <br />
<?=gettext("This option only applies if you have defined one or more static routes. If it is enabled, traffic that enters and " . <?=gettext("This option only applies if you have defined one or more static routes. If it is enabled, traffic that enters and " .
"leaves through the same interface will not be checked by the firewall. This may be desirable in some situations where " . "leaves through the same interface will not be checked by the firewall. This may be desirable in some situations where " .
"multiple subnets are connected to the same interface.");?> "multiple subnets are connected to the same interface.");?>
<br /> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext('Disable Auto-added VPN rules') ?></td> <td><a id="help_for_disablevpnrules" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Disable Auto-added VPN rules') ?></td>
<td width="78%" class="vtable"> <td>
<input name="disablevpnrules" type="checkbox" id="disablevpnrules" value="yes" <?php if (isset($config['system']['disablevpnrules'])) { <input name="disablevpnrules" type="checkbox" value="yes" <?=!empty($pconfig['disablevpnrules']) ? "checked=\"checked\"" :"";?> />
echo "checked=\"checked\""; <div class="hidden" for="help_for_disablevpnrules">
} ?> />
<strong><?=gettext("Disable all auto-added VPN rules.");?></strong> <strong><?=gettext("Disable all auto-added VPN rules.");?></strong>
<br /> <br />
<span class="vexpl"><?=gettext("Note: This disables automatically added rules for IPsec, PPTP.");?> <?=gettext("Note: This disables automatically added rules for IPsec, PPTP.");?>
</span> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext('Disable reply-to') ?></td> <td><a id="help_for_disablereplyto" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Disable reply-to') ?></td>
<td width="78%" class="vtable"> <td>
<input name="disablereplyto" type="checkbox" id="disablereplyto" value="yes" <?php if ($pconfig['disablereplyto']) { <input name="disablereplyto" type="checkbox" value="yes" <?=!empty($pconfig['disablereplyto']) ? "checked=\"checked\"" : "";?> />
echo "checked=\"checked\""; <div class="hidden" for="help_for_disablereplyto">
} ?> />
<strong><?=gettext("Disable reply-to on WAN rules");?></strong> <strong><?=gettext("Disable reply-to on WAN rules");?></strong>
<br /> <br />
<?=gettext("With Multi-WAN you generally want to ensure traffic leaves the same interface it arrives on, hence reply-to is added automatically by default. " . <?=gettext("With Multi-WAN you generally want to ensure traffic leaves the same interface it arrives on, hence reply-to is added automatically by default. " .
"When using bridging, you must disable this behavior if the WAN gateway IP is different from the gateway IP of the hosts behind the bridged interface.");?> "When using bridging, you must disable this behavior if the WAN gateway IP is different from the gateway IP of the hosts behind the bridged interface.");?>
<br /> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext('Disable Negate rules') ?></td> <td><a id="help_for_disablenegate" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext('Disable Negate rules') ?></td>
<td width="78%" class="vtable"> <td>
<input name="disablenegate" type="checkbox" id="disablenegate" value="yes" <?php if ($pconfig['disablenegate']) { <input name="disablenegate" type="checkbox" value="yes" <?=!empty($pconfig['disablenegate']) ? "checked=\"checked\"" : "";?> />
echo "checked=\"checked\""; <div class="hidden" for="help_for_disablenegate">
} ?> />
<strong><?=gettext("Disable Negate rule on policy routing rules");?></strong> <strong><?=gettext("Disable Negate rule on policy routing rules");?></strong>
<br /> <br />
<?=gettext("With Multi-WAN you generally want to ensure traffic reaches directly connected networks and VPN networks when using policy routing. You can disable this for special purposes but it requires manually creating rules for these networks");?> <?=gettext("With Multi-WAN you generally want to ensure traffic reaches directly connected networks and VPN networks when using policy routing. You can disable this for special purposes but it requires manually creating rules for these networks");?>
<br /> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Aliases Hostnames Resolve Interval");?></td> <td><a id="help_for_aliasesresolveinterval" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Aliases Resolve Interval");?></td>
<td width="78%" class="vtable"> <td>
<input name="aliasesresolveinterval" type="text" id="aliasesresolveinterval" value="<?php echo $pconfig['aliasesresolveinterval']; ?>" /> <input name="aliasesresolveinterval" type="text" value="<?=$pconfig['aliasesresolveinterval']; ?>" />
<br /> <div class="hidden" for="help_for_aliasesresolveinterval">
<strong><?=gettext("Interval, in seconds, that will be used to resolve hostnames configured on aliases.");?></strong> <strong><?=gettext("Interval, in seconds, that will be used to resolve hostnames configured on aliases.");?></strong>
<br /> <br />
<span class="vexpl"><?=gettext("Note: Leave this blank for the default (300s).");?></span> <?=gettext("Note: Leave this blank for the default (300s).");?>
</div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Check certificate of aliases URLs");?></td> <td><a id="help_for_aliasesresolveinterval" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Check certificate of aliases URLs");?></td>
<td width="78%" class="vtable"> <td>
<input name="checkaliasesurlcert" type="checkbox" id="checkaliasesurlcert" value="yes" <?php if ($pconfig['checkaliasesurlcert']) { <input name="checkaliasesurlcert" type="checkbox" value="yes" <?=!empty($pconfig['checkaliasesurlcert']) ? "checked=\"checked\"" : "";?> />
echo "checked=\"checked\""; <div class="hidden" for="help_for_aliasesresolveinterval">
} ?> />
<strong><?=gettext("Verify HTTPS certificates when downloading alias URLs");?></strong> <strong><?=gettext("Verify HTTPS certificates when downloading alias URLs");?></strong>
<br /> <br />
<?=gettext("Make sure the certificate is valid for all HTTPS addresses on aliases. If it's not valid or is revoked, do not download it.");?> <?=gettext("Make sure the certificate is valid for all HTTPS addresses on aliases. If it's not valid or is revoked, do not download it.");?>
<br /> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<th colspan="2" valign="top" class="listtopic"><?=gettext("Bogon Networks");?></th> <th colspan="2" valign="top" class="listtopic"><?=gettext("Bogon Networks");?></th>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Update Frequency");?></td> <td><a id="help_for_bogonsinterval" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Update Frequency");?></td>
<td width="78%" class="vtable"> <td>
<select name="bogonsinterval" class="formselect selectpicker" data-style="btn-default"> <select name="bogonsinterval" class="formselect selectpicker" data-style="btn-default">
<option value="monthly" <?php if (empty($pconfig['bogonsinterval']) || $pconfig['bogonsinterval'] == 'monthly') { <option value="monthly" <?=empty($pconfig['bogonsinterval']) || $pconfig['bogonsinterval'] == 'monthly' ? "selected=\"selected\"" : "";?>>
echo "selected=\"selected\""; <?=gettext("Monthly"); ?>
</option>
} ?>><?=gettext("Monthly"); ?></option> <option value="weekly" <?=$pconfig['bogonsinterval'] == 'weekly' ? "selected=\"selected\"" :"";?>>
<option value="weekly" <?php if ($pconfig['bogonsinterval'] == 'weekly') { <?=gettext("Weekly"); ?>
echo "selected=\"selected\""; </option>
<option value="daily" <?=$pconfig['bogonsinterval'] == 'daily' ? "selected=\"selected\"" : "";?>>
} ?>><?=gettext("Weekly"); ?></option> <?=gettext("Daily"); ?>
<option value="daily" <?php if ($pconfig['bogonsinterval'] == 'daily') { </option>
echo "selected=\"selected\"";
} ?>><?=gettext("Daily"); ?></option>
</select> </select>
<br /> <div class="hidden" for="help_for_bogonsinterval">
<?=gettext("The frequency of updating the lists of IP addresses that are reserved (but not RFC 1918) or not yet assigned by IANA.");?> <?=gettext("The frequency of updating the lists of IP addresses that are reserved (but not RFC 1918) or not yet assigned by IANA.");?>
</div>
</td> </td>
</tr> </tr>
<?php
if (count($config['interfaces']) > 1) :?>
<?php if (count($config['interfaces']) > 1) :
?>
<tr> <tr>
<th colspan="2" valign="top" class="listtopic"><?=gettext("Network Address Translation");?></th> <th colspan="2" valign="top" class="listtopic"><?=gettext("Network Address Translation");?></th>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("NAT Reflection mode for port forwards");?></td> <td><a id="help_for_natreflection" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Reflection for port forwards");?></td>
<td width="78%" class="vtable"> <td>
<select name="natreflection" class="formselect selectpicker" data-style="btn-default"> <select name="natreflection" class="formselect selectpicker" data-style="btn-default">
<option value="disable" <?php if (isset($config['system']['disablenatreflection'])) { <option value="disable" <?=$pconfig['natreflection'] == "disable" ? "selected=\"selected\"" : "";?>>
echo "selected=\"selected\""; <?=gettext("Disable"); ?>
</option>
} ?>><?=gettext("Disable"); ?></option> <option value="proxy" <?=$pconfig['natreflection'] == "proxy" ? "selected=\"selected\"" : "";?>>
<option value="proxy" <?php if (!isset($config['system']['disablenatreflection']) && !isset($config['system']['enablenatreflectionpurenat'])) { <?=gettext("Enable (NAT + Proxy)"); ?>
echo "selected=\"selected\""; </option>
<option value="purenat" <?=$pconfig['natreflection'] == "purenat" ? "selected=\"selected\"" : "";?>>
} ?>><?=gettext("Enable (NAT + Proxy)"); ?></option> <?=gettext("Enable (Pure NAT)"); ?>
<option value="purenat" <?php if (!isset($config['system']['disablenatreflection']) && isset($config['system']['enablenatreflectionpurenat'])) { </option>
echo "selected=\"selected\"";
} ?>><?=gettext("Enable (Pure NAT)"); ?></option>
</select> </select>
<br /> <div class="hidden" for="help_for_natreflection">
<strong><?=gettext("When enabled, this automatically creates additional NAT redirect rules for access to port forwards on your external IP addresses from within your internal networks.");?></strong> <strong><?=gettext("When enabled, this automatically creates additional NAT redirect rules for access to port forwards on your external IP addresses from within your internal networks.");?></strong>
<br /><br /> <br /><br />
<?=gettext("The NAT + proxy mode uses a helper program to send packets to the target of the port forward. It is useful in setups where the interface and/or gateway IP used for communication with the target cannot be accurately determined at the time the rules are loaded. Reflection rules are not created for ranges larger than 500 ports and will not be used for more than 1000 ports total between all port forwards. Only TCP and UDP protocols are supported.");?> <?=gettext("The NAT + proxy mode uses a helper program to send packets to the target of the port forward. It is useful in setups where the interface and/or gateway IP used for communication with the target cannot be accurately determined at the time the rules are loaded. Reflection rules are not created for ranges larger than 500 ports and will not be used for more than 1000 ports total between all port forwards. Only TCP and UDP protocols are supported.");?>
...@@ -548,62 +534,64 @@ endif; ?> ...@@ -548,62 +534,64 @@ endif; ?>
<?=gettext("The pure NAT mode uses a set of NAT rules to direct packets to the target of the port forward. It has better scalability, but it must be possible to accurately determine the interface and gateway IP used for communication with the target at the time the rules are loaded. There are no inherent limits to the number of ports other than the limits of the protocols. All protocols available for port forwards are supported.");?> <?=gettext("The pure NAT mode uses a set of NAT rules to direct packets to the target of the port forward. It has better scalability, but it must be possible to accurately determine the interface and gateway IP used for communication with the target at the time the rules are loaded. There are no inherent limits to the number of ports other than the limits of the protocols. All protocols available for port forwards are supported.");?>
<br /><br /> <br /><br />
<?=gettext("Individual rules may be configured to override this system setting on a per-rule basis.");?> <?=gettext("Individual rules may be configured to override this system setting on a per-rule basis.");?>
</div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Reflection Timeout");?></td> <td><a id="help_for_reflectiontimeout" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Reflection Timeout");?></td>
<td width="78%" class="vtable"> <td>
<input name="reflectiontimeout" id="reflectiontimeout" type="text" value="<?php echo $config['system']['reflectiontimeout']; ?>" /><br /> <input name="reflectiontimeout" type="text" value="<?=$pconfig['reflectiontimeout']; ?>" />
<div class="hidden" for="help_for_reflectiontimeout">
<strong><?=gettext("Enter value for Reflection timeout in seconds.");?></strong> <strong><?=gettext("Enter value for Reflection timeout in seconds.");?></strong>
<br /><br /> <br /><br />
<?=gettext("Note: Only applies to Reflection on port forwards in NAT + proxy mode.");?> <?=gettext("Note: Only applies to Reflection on port forwards in NAT + proxy mode.");?>
</div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Enable NAT Reflection for 1:1 NAT");?></td> <td><a id="help_for_enablebinatreflection" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Enable Reflection for 1:1");?></td>
<td width="78%" class="vtable"> <td>
<input name="enablebinatreflection" type="checkbox" id="enablebinatreflection" value="yes" <?php if (isset($config['system']['enablebinatreflection'])) { <input name="enablebinatreflection" type="checkbox" id="enablebinatreflection" value="yes" <?=!empty($pconfig['enablebinatreflection']) ? "checked=\"checked\"" : "";?>/>
echo "checked=\"checked\""; <div class="hidden" for="help_for_enablebinatreflection">
} ?> />
<strong><?=gettext("Enables the automatic creation of additional NAT redirect rules for access to 1:1 mappings of your external IP addresses from within your internal networks.");?></strong> <strong><?=gettext("Enables the automatic creation of additional NAT redirect rules for access to 1:1 mappings of your external IP addresses from within your internal networks.");?></strong>
<br /><br /> <br /><br />
<?=gettext("Note: Reflection on 1:1 mappings is only for the inbound component of the 1:1 mappings. This functions the same as the pure NAT mode for port forwards. For more details, refer to the pure NAT mode description above.");?> <?=gettext("Note: Reflection on 1:1 mappings is only for the inbound component of the 1:1 mappings. This functions the same as the pure NAT mode for port forwards. For more details, refer to the pure NAT mode description above.");?>
<br /><br /> <br /><br />
<?=gettext("Individual rules may be configured to override this system setting on a per-rule basis.");?> <?=gettext("Individual rules may be configured to override this system setting on a per-rule basis.");?>
</div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Enable automatic outbound NAT for Reflection");?></td> <td><a id="help_for_enablenatreflectionhelper" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Enable automatic outbound NAT for Reflection");?></td>
<td width="78%" class="vtable"> <td>
<input name="enablenatreflectionhelper" type="checkbox" id="enablenatreflectionhelper" value="yes" <?php if (isset($config['system']['enablenatreflectionhelper'])) { <input name="enablenatreflectionhelper" type="checkbox" id="enablenatreflectionhelper" value="yes" <?=!empty($pconfig['enablenatreflectionhelper']) ? "checked=\"checked\"" : "";?> />
echo "checked=\"checked\""; <div class="hidden" for="help_for_enablenatreflectionhelper">
} ?> />
<strong><?=gettext("Automatically create outbound NAT rules which assist inbound NAT rules that direct traffic back out to the same subnet it originated from.");?></strong> <strong><?=gettext("Automatically create outbound NAT rules which assist inbound NAT rules that direct traffic back out to the same subnet it originated from.");?></strong>
<br /> <br />
<?=gettext("Required for full functionality of the pure NAT mode of NAT Reflection for port forwards or NAT Reflection for 1:1 NAT.");?> <?=gettext("Required for full functionality of the pure NAT mode of NAT Reflection for port forwards or NAT Reflection for 1:1 NAT.");?>
<br /><br /> <br /><br />
<?=gettext("Note: This only works for assigned interfaces. Other interfaces require manually creating the outbound NAT rules that direct the reply packets back through the router.");?> <?=gettext("Note: This only works for assigned interfaces. Other interfaces require manually creating the outbound NAT rules that direct the reply packets back through the router.");?>
</div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("FTP Proxy");?></td> <td><a id="help_for_ftp_proxy_client" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("FTP Proxy");?></td>
<td width="78%" class="vtable"> <td>
<input name="ftp-proxy-client" type="checkbox" id="ftp-proxy-client" value="yes" <?php if (isset($config['system']['ftp-proxy']['client'])) { <input name="ftp-proxy-client" type="checkbox" value="yes" <?= !empty($pconfig['ftp-proxy-client']) ? "checked=\"checked\"" : "";?> />
echo "checked=\"checked\""; <div class="hidden" for="help_for_ftp_proxy_client">
} ?> />
<strong><?=gettext("Enable FTP proxy for clients");?></strong> <strong><?=gettext("Enable FTP proxy for clients");?></strong>
<br /> <br />
<?=gettext("Configures the FTP proxy to allow for client connections behind the firewall using active file transfer mode.");?> <?=gettext("Configures the FTP proxy to allow for client connections behind the firewall using active file transfer mode.");?>
</div>
</td> </td>
</tr> </tr>
<?php <?php
endif; ?> endif; ?>
<tr> <tr>
<td width="22%" valign="top">&nbsp;</td> <td></td>
<td width="78%"><input name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Save");?>" /></td> <td><input name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Save");?>" /></td>
</tr> </tr>
</tbody>
</table> </table>
</form> </form>
</div> </div>
...@@ -611,5 +599,4 @@ endif; ?> ...@@ -611,5 +599,4 @@ endif; ?>
</div> </div>
</div> </div>
</section> </section>
<?php include("foot.inc"); <?php include("foot.inc");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment