From e260bd6f4c16d0002ced256d93f8b4ade6e7777a Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 25 Oct 2005 17:05:06 +0000 Subject: 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 **** Destination port:   - (leave blank for any) --- 351,357 ---- Destination port:   + (leave blank for any) --- usr/local/www/firewall_nat_out_edit.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'usr/local') 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() {   Enter the source network for the outbound NAT mapping. + + Source port:   + (leave blank for any) + @@ -341,8 +350,8 @@ function sourcesel_change() { the outbound NAT mapping. - NAT port:   - (leave blank for any) + Destination port:   + (leave blank for any) @@ -373,7 +382,7 @@ function sourcesel_change() { Port:   - +   Enter the source port for the outbound NAT mapping. -- cgit v1.1