summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-01-03 04:38:46 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-01-03 04:38:46 +0000
commitf6ded420af0b3ec8ff60705b28e60afd7ea814f8 (patch)
tree7424a26224abddec84fa3e6951ce815f71a32c44 /usr
parentd1d6fdf30bebf8b46ae7e7d91f0e87b2b3e7d746 (diff)
downloadpfsense-f6ded420af0b3ec8ff60705b28e60afd7ea814f8.zip
pfsense-f6ded420af0b3ec8ff60705b28e60afd7ea814f8.tar.gz
Add static-port option for outbound NAT
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/firewall_nat_out_edit.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/usr/local/www/firewall_nat_out_edit.php b/usr/local/www/firewall_nat_out_edit.php
index 3c9fbe0..e26e4dc 100755
--- a/usr/local/www/firewall_nat_out_edit.php
+++ b/usr/local/www/firewall_nat_out_edit.php
@@ -63,6 +63,7 @@ if (isset($id) && $a_out[$id]) {
$pconfig['descr'] = $a_out[$id]['descr'];
$pconfig['nonat'] = $a_out[$id]['nonat'];
$pconfig['nosync'] = isset($a_out[$id]['nosync']);
+ $pconfig['staticnatport'] = isset($a_out[$id]['staticnatport']);
} else {
$pconfig['source_subnet'] = 24;
$pconfig['destination'] = "any";
@@ -179,6 +180,12 @@ if ($_POST) {
$natent['target'] = $_POST['target'];
$natent['interface'] = $_POST['interface'];
+ /* static-port */
+ if(isset($_POST['staticnatport']))
+ $natent['staticnatport'] = true;
+ else
+ unset($natent['staticnatport']);
+
/* if user has selected not nat, set it here */
if(isset($_POST['nonat']))
$natent['nonat'] = true;
@@ -387,6 +394,10 @@ function sourcesel_change() {
<td>Port:&nbsp;&nbsp;</td>
<td><input name="natport" type="text" class="formfld" id="natport" size="5" value="<?=htmlspecialchars($pconfig['natport']);?>"></td>
</tr>
+ <tr>
+ <td>Static-port:&nbsp;&nbsp;</td>
+ <td><input name="staticnatport" type="text" class="formfld" id="staticnatport" size="5" value="<?=htmlspecialchars($pconfig['staticnatport']);?>"></td>
+ </tr>
<tr><td>&nbsp;</td><td>
<span class="vexpl">Enter the source port for the outbound NAT mapping.</span>
</td></tr>
OpenPOWER on IntegriCloud