diff options
author | Erik Fonnesbeck <efonnes@gmail.com> | 2010-07-05 19:31:14 -0600 |
---|---|---|
committer | Erik Fonnesbeck <efonnes@gmail.com> | 2010-07-05 19:31:14 -0600 |
commit | 15409667f720dd1191219c5a32d01e6562f74e8f (patch) | |
tree | 288e7a7e523246d9d6ce57149570ea1d08cfc0b8 /usr/local/www/firewall_nat_edit.php | |
parent | f60181150d6a64b9bcfaa246311e60a6a546b768 (diff) | |
download | pfsense-15409667f720dd1191219c5a32d01e6562f74e8f.zip pfsense-15409667f720dd1191219c5a32d01e6562f74e8f.tar.gz |
Add per-rule NAT reflection override.
Diffstat (limited to 'usr/local/www/firewall_nat_edit.php')
-rwxr-xr-x | usr/local/www/firewall_nat_edit.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/usr/local/www/firewall_nat_edit.php b/usr/local/www/firewall_nat_edit.php index c769878..3f06928 100755 --- a/usr/local/www/firewall_nat_edit.php +++ b/usr/local/www/firewall_nat_edit.php @@ -84,6 +84,7 @@ if (isset($id) && $a_nat[$id]) { $pconfig['interface'] = $a_nat[$id]['interface']; $pconfig['associated-rule-id'] = $a_nat[$id]['associated-rule-id']; $pconfig['nosync'] = isset($a_nat[$id]['nosync']); + $pconfig['natreflection'] = $a_nat[$id]['natreflection']; if (!$pconfig['interface']) $pconfig['interface'] = "wan"; @@ -315,6 +316,11 @@ if ($_POST) { else unset($natent['nosync']); + if ($_POST['natreflection'] == "enable" || $_POST['natreflection'] == "disable") + $natent['natreflection'] = $_POST['natreflection']; + else + unset($natent['natreflection']); + // If we used to have an associated filter rule, but no-longer should have one if (!empty($a_nat[$id]) && ( empty($natent['associated-rule-id']) || $natent['associated-rule-id'] != $a_nat[$id]['associated-rule-id'] ) ) { // Delete the previous rule @@ -749,6 +755,16 @@ include("fbegin.inc"); ?> HINT: This prevents the rule from automatically syncing to other CARP members. </td> </tr> + <tr> + <td width="22%" valign="top" class="vncell">NAT reflection</td> + <td width="78%" class="vtable"> + <select name="natreflection" class="formselect"> + <option value="default" <?php if ($pconfig['natreflection'] != "enable" && $pconfig['natreflection'] != "disable") echo "selected"; ?>>use system default</option> + <option value="enable" <?php if ($pconfig['natreflection'] == "enable") echo "selected"; ?>>enable</option> + <option value="disable" <?php if ($pconfig['natreflection'] == "disable") echo "selected"; ?>>disable</option> + </select> + </td> + </tr> <?php if (isset($id) && $a_nat[$id] && !isset($_GET['dup'])): ?> <tr> <td width="22%" valign="top" class="vncell">Filter rule association</td> |