From 37e2071c0c75552a83662e2003caf4835929b43b Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Thu, 3 Mar 2005 22:24:33 +0000 Subject: * Add header with CSS at top (m0n0wall apparently moved this to fbeing.inc) * Change the colors to pfSense * Thanks to Colin for doing all the hard work :) --- usr/local/www/firewall_rules.php | 122 ++++++++++++++++++++------------------- 1 file changed, 64 insertions(+), 58 deletions(-) (limited to 'usr/local/www/firewall_rules.php') diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php index 5021169..a8fe5a6 100755 --- a/usr/local/www/firewall_rules.php +++ b/usr/local/www/firewall_rules.php @@ -1,36 +1,35 @@ #!/usr/local/bin/php . - All rights reserved. + Copyright (C) 2003-2005 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. */ +$pgtitle = array("Firewall", "Rules"); require("guiconfig.inc"); if (!is_array($config['filter']['rule'])) { @@ -53,23 +52,20 @@ for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++) { } if (!$if || !isset($iflist[$if])) - $if = "lan"; + $if = "wan"; if ($_POST) { $pconfig = $_POST; if ($_POST['apply']) { - $retval = "Reboot is currently required."; + $retval = 0; if (!file_exists($d_sysrebootreqd_path)) { config_lock(); $retval = filter_configure(); config_unlock(); } - if(stristr($retval, "error") <> true) - $savemsg = get_std_save_message($retval); - else - $savemsg = $retval; + $savemsg = get_std_save_message($retval); if ($retval == 0) { if (file_exists($d_natconfdirty_path)) unlink($d_natconfdirty_path); @@ -100,7 +96,7 @@ if (isset($_POST['del_x'])) { } } else { /* yuck - IE won't send value attributes for image buttons, while Mozilla does - - so we use .x/.y to find move button clicks instead... */ + so we use .x/.y to fine move button clicks instead... */ unset($movebtn); foreach ($_POST as $pn => $pd) { if (preg_match("/move_(\d+)_x/", $pn, $matches)) { @@ -152,7 +148,6 @@ if (isset($_POST['del_x'])) { -

Firewall: Rules

@@ -172,7 +167,7 @@ function fr_bgcolor(id) { for (i = 2; i <= 6; i++) { cells[i].style.backgroundColor = checkbox.checked ? "#FFFFBB" : "#FFFFFF"; } - cells[7].style.backgroundColor = checkbox.checked ? "#FFFFBB" : "#D9DEE8"; + //cells[7].style.backgroundColor = checkbox.checked ? "#FFFFBB" : "#990000"; } function fr_insline(id, on) { var row = document.getElementById('fr' + id); @@ -187,9 +182,10 @@ function fr_insline(id, on) { for (i = 2; i <= 7; i++) { if (on) { - prevcells[i].style.borderBottom = "3px solid #999999"; + prevcells[i].style.borderBottom = "3px solid #990000"; prevcells[i].style.paddingBottom = (id != 0) ? 2 : 3; } else { + prevcells[i].style.borderBottom = "1px solid #999999"; prevcells[i].style.borderBottomWidth = "1px"; prevcells[i].style.paddingBottom = (id != 0) ? 4 : 5; } @@ -197,9 +193,10 @@ function fr_insline(id, on) { for (i = 2; i <= 7; i++) { if (on) { - cells[i].style.borderTop = "2px solid #999999"; + cells[i].style.borderTop = "2px solid #990000"; cells[i].style.paddingTop = 2; } else { + prevcells[i].style.borderBottom = "1px solid #999999"; cells[i].style.borderTopWidth = 0; cells[i].style.paddingTop = 4; } @@ -207,34 +204,36 @@ function fr_insline(id, on) { } // --> +

You must apply the changes in order for them to take effect.");?>

-
+
    - $ifname): + $ifname): if ($ifent == $if): ?>
  • -
  • +
  • ">
  • - +
+ - + - - + + - - - - - - + - - + + + + + + + + + @@ -364,13 +372,11 @@ function fr_insline(id, on) {
    Proto Source Port Destination PortDescriptionDescription
+
+ + + + + +   + - - +
@@ -303,6 +303,7 @@ function fr_insline(id, on) {
@@ -311,18 +312,25 @@ function fr_insline(id, on) { Click the button to add a new rule.
       - + + - +
-

Hint:
-
rules are evaluated on a first-match basis (i.e. + Rules are evaluated on a first-match basis (i.e. the action of the first rule to match a packet will be executed). This means that if you use block rules, you'll have to pay attention to the rule order. Everything that isn't explicitly passed is blocked by default.

- + - - -- cgit v1.1