diff --git a/usr/local/www/firewall_nat_out_edit.php b/usr/local/www/firewall_nat_out_edit.php index 4e7c099414..5b2fb87f9d 100755 --- a/usr/local/www/firewall_nat_out_edit.php +++ b/usr/local/www/firewall_nat_out_edit.php @@ -1,34 +1,34 @@ . - All rights reserved. + originally part of m0n0wall (http://m0n0.ch/wall) + Copyright (C) 2003-2004 Manuel Kasper . + All rights reserved. - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. */ /* pfSense_MODULE: nat @@ -111,7 +111,7 @@ if (isset($id) && $a_out[$id]) { } if (isset($_GET['dup'])) { - unset($id); + unset($id); } if ($_POST) { @@ -126,15 +126,15 @@ if ($_POST) { unset($input_errors); $pconfig = $_POST; - /* run through $_POST items encoding HTML entties so that the user - * cannot think he is slick and perform a XSS attack on the unwilling - */ - foreach ($_POST as $key => $value) { - $temp = str_replace(">", "", $value); - $newpost = htmlentities($temp); - if($newpost <> $temp) - $input_errors[] = sprintf(gettext("Invalid characters detected (%s). Please remove invalid characters and save again."),$temp); - } + /* run through $_POST items encoding HTML entties so that the user + * cannot think he is slick and perform a XSS attack on the unwilling + */ + foreach ($_POST as $key => $value) { + $temp = str_replace(">", "", $value); + $newpost = htmlentities($temp); + if($newpost <> $temp) + $input_errors[] = sprintf(gettext("Invalid characters detected (%s). Please remove invalid characters and save again."),$temp); + } /* input validation */ $reqdfields = explode(" ", "interface protocol source source_subnet destination destination_subnet"); @@ -175,13 +175,13 @@ if ($_POST) { $input_errors[] = gettext("A valid source bit count must be specified."); } if ($_POST['destination_type'] != "any") { - if ($_POST['destination'] && !is_ipaddroralias($_POST['destination'])) { + if ($_POST['destination'] && !is_ipaddroralias($_POST['destination'])) { $input_errors[] = gettext("A valid destination must be specified."); } } - if ($_POST['destination_subnet'] && !is_numericint($_POST['destination_subnet'])) { - $input_errors[] = gettext("A valid destination bit count must be specified."); - } + if ($_POST['destination_subnet'] && !is_numericint($_POST['destination_subnet'])) { + $input_errors[] = gettext("A valid destination bit count must be specified."); + } if ($_POST['destination_type'] == "any") { if ($_POST['destination_not']) { $input_errors[] = gettext("Negating destination address of \"any\" is invalid."); @@ -353,32 +353,32 @@ function staticportchange() { } } function typesel_change() { - switch (document.iform.destination_type.selectedIndex) { - case 1: // network - document.iform.destination.disabled = 0; - document.iform.destination_subnet.disabled = 0; - break; - default: - document.iform.destination.value = ""; - document.iform.destination.disabled = 1; - document.iform.destination_subnet.value = "24"; - document.iform.destination_subnet.disabled = 1; - break; - } + switch (document.iform.destination_type.selectedIndex) { + case 1: // network + document.iform.destination.disabled = 0; + document.iform.destination_subnet.disabled = 0; + break; + default: + document.iform.destination.value = ""; + document.iform.destination.disabled = 1; + document.iform.destination_subnet.value = "24"; + document.iform.destination_subnet.disabled = 1; + break; + } } function sourcesel_change() { - switch (document.iform.source_type.selectedIndex) { - case 1: // network - document.iform.source.disabled = 0; - document.iform.source_subnet.disabled = 0; - break; - default: - document.iform.source.value = ""; - document.iform.source.disabled = 1; - document.iform.source_subnet.value = "24"; - document.iform.source_subnet.disabled = 1; - break; - } + switch (document.iform.source_type.selectedIndex) { + case 1: // network + document.iform.source.disabled = 0; + document.iform.source_subnet.disabled = 0; + break; + default: + document.iform.source.value = ""; + document.iform.source.disabled = 1; + document.iform.source_subnet.value = "24"; + document.iform.source_subnet.disabled = 1; + break; + } } function nonat_change() { if (document.iform.nonat.checked) { @@ -433,297 +433,402 @@ function poolopts_change() { -
- - - - + +
+ + + - - - - - - - - - - - + + + + + + + + + + - + foreach ($interfaces as $iface => $ifacename): +?> + + +
+
+ +
+ + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - + - - + - - - - - - -
- /> -
- -
- /> - -
-
+ /> +
+ +
+ /> + +
+
+
-
-


- "," ");?>
+ + + +
+
+"," "); +?> +
- - - - - - - - - - - - - - - - - -
   - -
  /
 
  
- /> -
-
-
- - - - - - - - - - - - - - - - - -
  
   - / -
 
  
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
   -
   - / -
  -
- -

-
Pool Options -
- -
- *
- *
- *
- *
- *
-

-
  
  - -
   />
-
- />
- -
- -
+ + + + + + + + + + + + + + + + + +
   + +
   + / + +
  + +
   + + +
+
+ /> +
+
+
+ + + + + + + + + + + + + + + + + +
   + +
   + / + +
  + +
   + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
   + +
   + / + +
  +
+ + + +

+
Pool Options + +
+ +
+ *
+ *
+ *
+ *
+ *
+

+
   + +
  + +
   />
+
+ />
+ +
+ +
+ +
 
  - " /> " onclick="history.back()" /> - - - - -
+ +   + + " /> " onclick="history.back()" /> + + + + + + +