summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_nat_out_edit.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-10-25 17:05:06 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-10-25 17:05:06 +0000
commite260bd6f4c16d0002ced256d93f8b4ade6e7777a (patch)
treed6632739e116cd9c47f8850548b965ae74dcd87c /usr/local/www/firewall_nat_out_edit.php
parent80cf44e9c9fac8f36420cd776bbee4b59bb915f0 (diff)
downloadpfsense-e260bd6f4c16d0002ced256d93f8b4ade6e7777a.zip
pfsense-e260bd6f4c16d0002ced256d93f8b4ade6e7777a.tar.gz
MFC 7153
UI for Commit [7145] Adv. rules WILL need to be modified for this change NOTE! This merge was not 100% clean. Had an issue with: *************** *** 342,348 **** </tr> <tr> <td>Destination port:&nbsp;&nbsp;</td> - <td><input name="natport" type="text" class="formfld" id="natport" size="5" value="<?=htmlspecialchars($pconfig['natport']);?>"> (leave blank for any)</td> </tr> </table> </td> --- 351,357 ---- </tr> <tr> <td>Destination port:&nbsp;&nbsp;</td> + <td><input name="dstport" type="text" class="formfld" id="dstport" size="5" value="<?=htmlspecialchars($pconfig['dstport']);?>"> (leave blank for any)</td> </tr> </table> </td>
Diffstat (limited to 'usr/local/www/firewall_nat_out_edit.php')
-rwxr-xr-xusr/local/www/firewall_nat_out_edit.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/usr/local/www/firewall_nat_out_edit.php b/usr/local/www/firewall_nat_out_edit.php
index 21df306..f12f14a 100755
--- a/usr/local/www/firewall_nat_out_edit.php
+++ b/usr/local/www/firewall_nat_out_edit.php
@@ -55,6 +55,7 @@ if (isset($id) && $a_out[$id]) {
address_to_pconfig($a_out[$id]['destination'], $pconfig['destination'],
$pconfig['destination_subnet'], $pconfig['destination_not'],
$none, $none);
+ $pconfig['dstport'] = $a_out[$id]['dstport'];
$pconfig['natport'] = $a_out[$id]['natport'];
$pconfig['target'] = $a_out[$id]['target'];
$pconfig['interface'] = $a_out[$id]['interface'];
@@ -115,6 +116,9 @@ if ($_POST) {
if ($_POST['destination_not'])
$input_errors[] = "Negating destination address of \"any\" is invalid.";
}
+ if ($_POST['dstport'] && !is_numericint($_POST['dstport'])) {
+ $input_errors[] = "A valid destination port must be specified.";
+ }
if ($_POST['natport'] && !is_numericint($_POST['natport'])) {
$input_errors[] = "A valid NAT port must be specified.";
}
@@ -188,6 +192,7 @@ if ($_POST) {
$natent['destination']['address'] = $ext;
$natent['natport'] = $_POST['natport'];
+ $natent['dstport'] = $_POST['dstport'];
if (isset($_POST['destination_not']) && $ext != "any")
$natent['destination']['not'] = true;
@@ -306,6 +311,10 @@ function sourcesel_change() {
<td>&nbsp;</td>
<td><span class="vexpl">Enter the source network for the outbound NAT mapping.</span></td>
</tr>
+ <tr>
+ <td>Source port:&nbsp;&nbsp;</td>
+ <td><input name="sourceport" type="text" class="formfld" id="sourceport" size="5" value="<?=htmlspecialchars($pconfig['sourceport']);?>"> (leave blank for any)</td>
+ </tr>
</table></td>
</tr>
<tr>
@@ -341,8 +350,8 @@ function sourcesel_change() {
the outbound NAT mapping.</span></td>
</tr>
<tr>
- <td>NAT port:&nbsp;&nbsp;</td>
- <td><input name="natport" type="text" class="formfld" id="natport" size="5" value="<?=htmlspecialchars($pconfig['natport']);?>"> (leave blank for any)</td>
+ <td>Destination port:&nbsp;&nbsp;</td>
+ <td><input name="dstport" type="text" class="formfld" id="dstport" size="5" value="<?=htmlspecialchars($pconfig['dstport']);?>"> (leave blank for any)</td>
</tr>
</table>
</td>
@@ -373,7 +382,7 @@ function sourcesel_change() {
</td></tr>
<tr>
<td>Port:&nbsp;&nbsp;</td>
- <td><input name="sourceport" type="text" class="formfld" id="sourceport" size="5" value="<?=htmlspecialchars($pconfig['sourceport']);?>"></td>
+ <td><input name="natport" type="text" class="formfld" id="natport" size="5" value="<?=htmlspecialchars($pconfig['natport']);?>"></td>
</tr>
<tr><td>&nbsp;</td><td>
<span class="vexpl">Enter the source port for the outbound NAT mapping.</span>
OpenPOWER on IntegriCloud