From cfc707f76372f4411961b97c2afc9174825b2216 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Fri, 19 Nov 2004 23:12:26 +0000 Subject: Add Copyright to each file that we have touched so far and re attribute the file to Manuel Kasper such as: Copyright (C) 2004 Scott Ullrich All rights reserved. originally part of m0n0wall (http://m0n0.ch/wall) Copyright (C) 2003-2004 Manuel Kasper . All rights reserved. --- usr/local/www/diag_logs.php | 26 +++++----- usr/local/www/firewall_nat_out_edit.php | 88 +++++++++++++++++---------------- usr/local/www/vpn_ipsec.php | 6 ++- usr/local/www/vpn_ipsec_edit.php | 6 ++- 4 files changed, 67 insertions(+), 59 deletions(-) (limited to 'usr/local/www') diff --git a/usr/local/www/diag_logs.php b/usr/local/www/diag_logs.php index 5be7a17..31b0a99 100755 --- a/usr/local/www/diag_logs.php +++ b/usr/local/www/diag_logs.php @@ -1,22 +1,24 @@ #!/usr/local/bin/php -. All rights reserved. - + 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. - + 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 @@ -45,11 +47,11 @@ function dump_clog($logfile, $tail, $withorig = true) { $sor = isset($config['syslog']['reverse']) ? "-r" : ""; exec("/usr/sbin/clog " . $logfile . " | tail {$sor} -n " . $tail, $logarr); - + foreach ($logarr as $logent) { $logent = preg_split("/\s+/", $logent, 6); echo "\n"; - + if ($withorig) { echo "" . htmlspecialchars(join(" ", array_slice($logent, 0, 3))) . "\n"; echo "" . htmlspecialchars($logent[4] . " " . $logent[5]) . "\n"; @@ -83,11 +85,11 @@ function dump_clog($logfile, $tail, $withorig = true) {
  • Settings
  • - + - - + diff --git a/usr/local/www/firewall_nat_out_edit.php b/usr/local/www/firewall_nat_out_edit.php index 723de78..0d4c991 100755 --- a/usr/local/www/firewall_nat_out_edit.php +++ b/usr/local/www/firewall_nat_out_edit.php @@ -1,22 +1,24 @@ #!/usr/local/bin/php -. All rights reserved. - + 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. - + 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 @@ -33,7 +35,7 @@ require("guiconfig.inc"); if (!is_array($config['nat']['advancedoutbound']['rule'])) $config['nat']['advancedoutbound']['rule'] = array(); - + $a_out = &$config['nat']['advancedoutbound']['rule']; nat_out_rules_sort(); @@ -74,19 +76,19 @@ if (isset($id) && $a_out[$id]) { } if ($_POST) { - + if ($_POST['destination_type'] == "any") { $_POST['destination'] = "any"; $_POST['destination_subnet'] = 24; } - + unset($input_errors); $pconfig = $_POST; /* input validation */ $reqdfields = explode(" ", "interface source source_subnet destination destination_subnet"); $reqdfieldsn = explode(",", "Interface,Source,Source bit count,Destination,Destination bit count"); - + do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); if ($_POST['source'] && !is_ipaddr($_POST['source'])) { @@ -106,7 +108,7 @@ if ($_POST) { if ($_POST['target'] && !is_ipaddr($_POST['target'])) { $input_errors[] = "A valid target IP address must be specified."; } - + /* check for existing entries */ $osn = gen_subnet($_POST['source'], $_POST['source_subnet']) . "/" . $_POST['source_subnet']; if ($_POST['destination_type'] == "any") @@ -114,7 +116,7 @@ if ($_POST) { else $ext = gen_subnet($_POST['destination'], $_POST['destination_subnet']) . "/" . $_POST['destination_subnet']; - + if ($_POST['target']) { /* check for clashes with 1:1 NAT (Server NAT is OK) */ if (is_array($config['nat']['onetoone'])) { @@ -126,14 +128,14 @@ if ($_POST) { } } } - + foreach ($a_out as $natent) { if (isset($id) && ($a_out[$id]) && ($a_out[$id] === $natent)) continue; - + if (!$natent['interface']) $natent['interface'] == "wan"; - + if (($natent['interface'] == $_POST['interface']) && ($natent['source']['network'] == $osn)) { if (isset($natent['destination']['not']) == isset($_POST['destination_not'])) { if ((isset($natent['destination']['any']) && ($ext == "any")) || @@ -151,24 +153,24 @@ if ($_POST) { $natent['descr'] = $_POST['descr']; $natent['target'] = $_POST['target']; $natent['interface'] = $_POST['interface']; - + if ($ext == "any") $natent['destination']['any'] = true; else $natent['destination']['network'] = $ext; - + if (isset($_POST['destination_not']) && $ext != "any") $natent['destination']['not'] = true; - + if (isset($id) && $a_out[$id]) $a_out[$id] = $natent; else $a_out[] = $natent; - + touch($d_natconfdirty_path); - + write_config(); - + header("Location: firewall_nat_out.php"); exit; } @@ -216,7 +218,7 @@ function typesel_change() { $interfaces['opt' . $i] = $config['interfaces']['opt' . $i]['descr']; } foreach ($interfaces as $iface => $ifacename): ?> - @@ -224,12 +226,12 @@ function typesel_change() { Choose which interface this rule applies to.
    Hint: in most cases, you'll want to use WAN here.
    - + - + - + - + - - + - diff --git a/usr/local/www/vpn_ipsec.php b/usr/local/www/vpn_ipsec.php index edbcd7d..f34c897 100755 --- a/usr/local/www/vpn_ipsec.php +++ b/usr/local/www/vpn_ipsec.php @@ -2,11 +2,13 @@ . All rights reserved. - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/usr/local/www/vpn_ipsec_edit.php b/usr/local/www/vpn_ipsec_edit.php index 51fccd5..5043cd8 100755 --- a/usr/local/www/vpn_ipsec_edit.php +++ b/usr/local/www/vpn_ipsec_edit.php @@ -2,11 +2,13 @@ . All rights reserved. - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -- cgit v1.1
    +
    Last system log entries
    Source - - / + + /
    Destination > @@ -248,22 +250,22 @@ function typesel_change() { Use this option to invert the sense of the match.

    - + - + -
    Type:  
    Address:   - / + /
     Enter the destination network for + Enter the destination network for the outbound NAT mapping.
    Target
    Packets matching this rule will be mapped to the IP address given here. Leave blank to use the selected interface's IP address.
    Description - -
    You may enter a description here +
    + +
    You may enter a description here for your reference (not parsed).
      - + + - +