summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xusr/local/www/diag_logs.php67
-rw-r--r--usr/local/www/diag_logs_auth.php101
-rw-r--r--usr/local/www/diag_logs_dhcp.php105
-rw-r--r--usr/local/www/diag_logs_filter.php72
-rwxr-xr-xusr/local/www/diag_logs_filter_dynamic.php26
-rw-r--r--usr/local/www/diag_logs_filter_summary.php26
-rwxr-xr-xusr/local/www/diag_logs_gateways.php140
-rw-r--r--usr/local/www/diag_logs_ipsec.php121
-rw-r--r--usr/local/www/diag_logs_ntpd.php102
-rw-r--r--usr/local/www/diag_logs_openvpn.php109
-rw-r--r--usr/local/www/diag_logs_ppp.php107
-rw-r--r--usr/local/www/diag_logs_relayd.php100
-rwxr-xr-xusr/local/www/diag_logs_resolver.php144
-rw-r--r--usr/local/www/diag_logs_routing.php111
-rw-r--r--usr/local/www/diag_logs_settings.php80
-rwxr-xr-xusr/local/www/diag_logs_vpn.php27
-rw-r--r--usr/local/www/diag_logs_wireless.php113
17 files changed, 166 insertions, 1385 deletions
diff --git a/usr/local/www/diag_logs.php b/usr/local/www/diag_logs.php
index 14e3ec9..a7f5e79 100755
--- a/usr/local/www/diag_logs.php
+++ b/usr/local/www/diag_logs.php
@@ -32,8 +32,8 @@
POSSIBILITY OF SUCH DAMAGE.
*/
-/*
- pfSense_MODULE: system
+/*
+ pfSense_MODULE: system
*/
##|+PRIV
@@ -45,13 +45,19 @@
require("guiconfig.inc");
-$system_logfile = "{$g['varlog_path']}/system.log";
+// The logs to display are specified in a GET argument. Default to 'system' logs
+if(!$_GET['logfile'])
+ $logfile = 'system';
+else
+ $logfile = $_GET['logfile'];
+
+$system_logfile = "{$g['varlog_path']}/{$logfile}.log";
$nentries = $config['syslog']['nentries'];
if (!$nentries)
$nentries = 50;
-if ($_POST['clear'])
+if ($_POST['clear'])
clear_log_file($system_logfile);
if ($_GET['filtertext'])
@@ -67,26 +73,28 @@ $pgtitle = array(gettext("Status"),gettext("System logs"),gettext("General"));
include("head.inc");
$tab_array = array();
-$tab_array[] = array(gettext("System"), true, "diag_logs.php");
+$tab_array[] = array(gettext("System"), ($logfile == 'system'), "diag_logs.php");
$tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
-$tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
-$tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
-$tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
-$tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
+$tab_array[] = array(gettext("DHCP"), ($logfile == 'dhcpd'), "diag_logs.php?logfile=dhcpd");
+$tab_array[] = array(gettext("Portal Auth"), ($logfile == 'portalauth'), "diag_logs.php?logfile=portalauth");
+$tab_array[] = array(gettext("IPsec"), ($logfile == 'ipsec'), "diag_logs.php?logfile=ipsec");
+$tab_array[] = array(gettext("PPP"), ($logfile == 'ppp'), "diag_logs.php?logfile=ppp");
$tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
-$tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
-$tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
-$tab_array[] = array(gettext("NTP"), false, "diag_logs_ntpd.php");
+$tab_array[] = array(gettext("Load Balancer"), ($logfile == 'relayd'), "diag_logs.php?logfile=relayd");
+$tab_array[] = array(gettext("OpenVPN"), ($logfile == 'openvpn'), "diag_logs.php?logfile=openvpn");
+$tab_array[] = array(gettext("NTP"), ($logfile == 'ntpd'), "diag_logs.php?logfile=ntpd");
$tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
display_top_tabs($tab_array);
$tab_array = array();
-$tab_array[] = array(gettext("General"), true, "/diag_logs.php");
-$tab_array[] = array(gettext("Gateways"), false, "/diag_logs_gateways.php");
-$tab_array[] = array(gettext("Routing"), false, "/diag_logs_routing.php");
-$tab_array[] = array(gettext("Resolver"), false, "/diag_logs_resolver.php");
-$tab_array[] = array(gettext("Wireless"), false, "/diag_logs_wireless.php");
-display_top_tabs($tab_array, false, 'nav nav-tabs');
+if(($logfile == 'system') || ($logfile == 'gateways') || ($logfile == 'routing') || ($logfile == 'resolver') || ($logfile == 'wireless')) {
+ $tab_array[] = array(gettext("General"), ($logfile == 'system'), "/diag_logs.php");
+ $tab_array[] = array(gettext("Gateways"), ($logfile == 'gateways'), "/diag_logs.php?logfile=gateways");
+ $tab_array[] = array(gettext("Routing"), ($logfile == 'routing'), "/diag_logs.php?logfile=routing");
+ $tab_array[] = array(gettext("Resolver"), ($logfile == 'resolver'), "/diag_logs.php?logfile=resolver");
+ $tab_array[] = array(gettext("Wireless"), ($logfile == 'wireless'), "/diag_logs.php?logfile=wireless");
+ display_top_tabs($tab_array, false, 'nav nav-tabs');
+}
require('classes/Form.class.php');
@@ -116,16 +124,21 @@ $form->add($section);
print $form;
?>
- <div class="panel panel-default">
- <div class="panel-heading"><?=gettext("Last ")?><?=$nentries?><?=gettext(" log entries")?></div>
- <pre>
+ <div class="panel panel-default">
+ <div class="panel-heading"><?=gettext("Last ")?><?=$nentries?> <?=$logfile?><?=gettext(" log entries")?></div>
+ <pre>
<?php
- if($filtertext)
- dump_clog_no_table($system_logfile, $nentries, true, array("$filtertext"), array("ppp"));
- else
- dump_clog_no_table($system_logfile, $nentries, true, array(), array("ppp"));
+ if(($logfile == 'resolver') || ($logfile == 'system'))
+ $inverse = array("ppp");
+ else
+ $inverse = null;
+
+ if($filtertext)
+ dump_clog_no_table($system_logfile, $nentries, true, array("$filtertext"), $inverse);
+ else
+ dump_clog_no_table($system_logfile, $nentries, true, array(), $inverse);
?>
- </pre>
+ </pre>
</div>
-<?php include("foot.inc"); ?>
+<?php include("foot.inc"); ?> \ No newline at end of file
diff --git a/usr/local/www/diag_logs_auth.php b/usr/local/www/diag_logs_auth.php
deleted file mode 100644
index ce296bc..0000000
--- a/usr/local/www/diag_logs_auth.php
+++ /dev/null
@@ -1,101 +0,0 @@
-<?php
-/* $Id$ */
-/*
- diag_logs_auth.php
- part of m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
-
- part of pfSense
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- 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
- 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: captiveportal
-*/
-
-##|+PRIV
-##|*IDENT=page-status-systemlogs-portalauth
-##|*NAME=Status: System logs: Portal Auth page
-##|*DESCR=Allow access to the 'Status: System logs: Portal Auth' page.
-##|*MATCH=diag_logs_auth.php*
-##|-PRIV
-
-require("guiconfig.inc");
-
-$portal_logfile = "{$g['varlog_path']}/portalauth.log";
-
-$nentries = $config['syslog']['nentries'];
-if (!$nentries)
- $nentries = 50;
-
-if ($_POST['clear'])
- clear_log_file($portal_logfile);
-
-$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Portal Auth"));
-$shortcut_section = "captiveportal";
-include("head.inc");
-
-?>
-
-<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-<?php include("fbegin.inc"); ?>
-<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="logs captive portal">
- <tr><td>
-<?php
- $tab_array = array();
- $tab_array[] = array(gettext("System"), false, "diag_logs.php");
- $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
- $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
- $tab_array[] = array(gettext("Portal Auth"), true, "diag_logs_auth.php");
- $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
- $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
- $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
- $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
- $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
- $tab_array[] = array(gettext("NTP"), false, "diag_logs_ntpd.php");
- $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
- display_top_tabs($tab_array);
-?>
- </td></tr>
- <tr>
- <td>
- <div id="mainarea">
- <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0" summary="main area">
- <tr>
- <td colspan="2" class="listtopic">
- <?php printf(gettext("Last %s Portal Auth log entries"),$nentries);?></td>
- </tr>
- <?php dump_clog($portal_logfile, $nentries, true); ?>
- <tr><td><br /><form action="diag_logs_auth.php" method="post">
- <input name="clear" type="submit" class="formbtn" value="<?= gettext("Clear log"); ?>"/></form></td></tr>
- </table>
- </div>
- </td>
- </tr>
-</table>
-<?php include("fend.inc"); ?>
-</body>
-</html>
diff --git a/usr/local/www/diag_logs_dhcp.php b/usr/local/www/diag_logs_dhcp.php
deleted file mode 100644
index 5cfa4d6..0000000
--- a/usr/local/www/diag_logs_dhcp.php
+++ /dev/null
@@ -1,105 +0,0 @@
-<?php
-/* $Id$ */
-/*
- diag_logs_dhcp.php
- Copyright (C) 2004-2009 Scott Ullrich
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- originally part of m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- 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
- 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: dhcpserver
-*/
-
-##|+PRIV
-##|*IDENT=page-diagnostics-logs-dhcp
-##|*NAME=Diagnostics: Logs: DHCP page
-##|*DESCR=Allow access to the 'Diagnostics: Logs: DHCP' page.
-##|*MATCH=diag_logs_dhcp.php*
-##|-PRIV
-
-require("guiconfig.inc");
-
-$dhcpd_logfile = "{$g['varlog_path']}/dhcpd.log";
-
-$nentries = $config['syslog']['nentries'];
-if (!$nentries)
- $nentries = 50;
-
-if ($_POST['clear']) {
- clear_log_file($dhcpd_logfile);
- killbyname("dhcpd");
- services_dhcpd_configure();
-}
-
-$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("DHCP"));
-$shortcut_section = "dhcp";
-include("head.inc");
-
-?>
-
-<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-<?php include("fbegin.inc"); ?>
-<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="logs dhcp">
- <tr><td>
-<?php
- $tab_array = array();
- $tab_array[] = array(gettext("System"), false, "diag_logs.php");
- $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
- $tab_array[] = array(gettext("DHCP"), true, "diag_logs_dhcp.php");
- $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
- $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
- $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
- $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
- $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
- $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
- $tab_array[] = array(gettext("NTP"), false, "diag_logs_ntpd.php");
- $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
- display_top_tabs($tab_array);
-?>
- </td></tr>
- <tr>
- <td>
- <div id="mainarea">
- <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0" summary="main area">
- <tr>
- <td colspan="2" class="listtopic">
- <?php printf(gettext("Last %s DHCP service log entries"), $nentries);?></td>
- </tr>
- <?php dump_clog($dhcpd_logfile, $nentries); ?>
- <tr><td><br /><form action="diag_logs_dhcp.php" method="post">
- <input name="clear" type="submit" class="formbtn" value="<?= gettext("Clear log");?>" /></form></td>
- <td>NOTE: Clearing the log file will restart the DHCP daemon.</td></tr>
- </table>
- </div>
- </td>
- </tr>
-</table>
-<?php include("fend.inc"); ?>
-</body>
-</html>
diff --git a/usr/local/www/diag_logs_filter.php b/usr/local/www/diag_logs_filter.php
index 7dac52b..89e8af5 100644
--- a/usr/local/www/diag_logs_filter.php
+++ b/usr/local/www/diag_logs_filter.php
@@ -2,7 +2,7 @@
/* $Id$ */
/*
diag_logs_filter.php
- part of pfSense
+ part of pfSense
Copyright (C) 2004-2009 Scott Ullrich
Copyright (C) 2013-2015 Electric Sheep Fencing, LP
originally based on m0n0wall (http://m0n0.ch/wall)
@@ -33,8 +33,8 @@
POSSIBILITY OF SUCH DAMAGE.
*/
-/*
- pfSense_MODULE: filter
+/*
+ pfSense_MODULE: filter
*/
##|+PRIV
@@ -51,12 +51,12 @@ require_once("filter_log.inc");
if (isset($_POST['resolve'])) {
$ip = strtolower($_POST['resolve']);
$res = (is_ipaddr($ip) ? gethostbyaddr($ip) : '');
-
+
if ($res && $res != $ip)
$response = array('resolve_ip' => $ip, 'resolve_text' => $res);
else
$response = array('resolve_ip' => $ip, 'resolve_text' => gettext("Cannot resolve"));
-
+
echo json_encode(str_replace("\\","\\\\", $response)); // single escape chars can break JSON decode
exit;
}
@@ -131,19 +131,19 @@ include("head.inc");
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="logs filter">
<tr><td>
<?php
- $tab_array = array();
- $tab_array[] = array(gettext("System"), false, "diag_logs.php");
- $tab_array[] = array(gettext("Firewall"), true, "diag_logs_filter.php");
- $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
- $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
- $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
- $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
- $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
- $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
- $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
- $tab_array[] = array(gettext("NTP"), false, "diag_logs_ntpd.php");
- $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
- display_top_tabs($tab_array);
+$tab_array = array();
+$tab_array[] = array(gettext("System"), false, "diag_logs.php");
+$tab_array[] = array(gettext("Firewall"), true, "diag_logs_filter.php");
+$tab_array[] = array(gettext("DHCP"), false, "diag_logs.php?logfile=dhcpd");
+$tab_array[] = array(gettext("Portal Auth"), false, "diag_logs.php?logfile=portalauth");
+$tab_array[] = array(gettext("IPsec"), false, "diag_logs.php?logfile=ipsec");
+$tab_array[] = array(gettext("PPP"), false, "diag_logs.php?logfile=ppp");
+$tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
+$tab_array[] = array(gettext("Load Balancer"), false, "diag_logs.php?logfile=relayd");
+$tab_array[] = array(gettext("OpenVPN"), false, "diag_logs.php?logfile=openvpn");
+$tab_array[] = array(gettext("NTP"), false, "diag_logs.php?logfile=ntpd");
+$tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
+display_top_tabs($tab_array);
?>
</td></tr>
<tr><td class="tabnavtbl">
@@ -157,14 +157,14 @@ include("head.inc");
</td>
</tr>
<tr>
- <td>
+ <td>
<div id="mainarea">
<table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0" style="sortableMultirow:<?=$config['syslog']['filterdescriptions'] === "2"?2:1?>" summary="main area">
<tr>
<td colspan="<?=(!isset($config['syslog']['rawfilter']))?7:2?>" align="left" valign="middle">
<div id="filterlogentries_show" class="widgetconfigdiv" style="<?=(!isset($config['syslog']['rawfilter']))?"":"display:none"?>">
<form id="filterlogentries" name="filterlogentries" action="diag_logs_filter.php" method="post">
- <?php
+ <?php
$Include_Act = explode(",", str_replace(" ", ",", $filterfieldsarray['act']));
if ($filterfieldsarray['interface'] == "All") $interface = "";
?>
@@ -173,8 +173,8 @@ include("head.inc");
<td rowspan="2">
<div align="center"><?=gettext("Action");?></div>
<div align="left">
- <input id="actpass" name="actpass" type="checkbox" value="Pass" <?php if (in_arrayi('Pass', $Include_Act)) echo "checked=\"checked\""; ?> /> Pass<br />
- <input id="actblock" name="actblock" type="checkbox" value="Block" <?php if (in_arrayi('Block', $Include_Act)) echo "checked=\"checked\""; ?> /> Block<br />
+ <input id="actpass" name="actpass" type="checkbox" value="Pass" <?php if (in_arrayi('Pass', $Include_Act)) echo "checked=\"checked\""; ?> /> Pass<br />
+ <input id="actblock" name="actblock" type="checkbox" value="Block" <?php if (in_arrayi('Block', $Include_Act)) echo "checked=\"checked\""; ?> /> Block<br />
</div>
</td>
<td>
@@ -238,10 +238,10 @@ include("head.inc");
<div align="center" style="vertical-align:top;">
<select name="interface" onchange="dst_change(this.value,iface_old,document.iform.dsttype.value);iface_old = document.iform.interface.value;typesel_change();">
<option value="" <?=$interfacefilter?"":"selected=\"selected\""?>>*Any interface</option>
- <?php
+ <?php
$iflist = get_configured_interface_with_descr(false, true);
//$iflist = get_interface_list();
- // Allow extending of the firewall edit interfaces
+ // Allow extending of the firewall edit interfaces
pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/pre_interfaces_edit");
foreach ($iflist as $if => $ifdesc)
$interfaces[$if] = $ifdesc;
@@ -260,7 +260,7 @@ include("head.inc");
$interfaces["enc0"] = "IPsec";
/* add openvpn/tun interfaces */
- if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"])
+ if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"])
$interfaces["openvpn"] = "OpenVPN";
foreach ($interfaces as $iface => $ifacename): ?>
@@ -297,13 +297,13 @@ include("head.inc");
<a href="#" onclick="toggleListDescriptions()">Show/hide rule descriptions</a>
<?php endif;?>
</div>
- </td>
+ </td>
</tr>
<?php if (!isset($config['syslog']['rawfilter'])):
$iflist = get_configured_interface_with_descr(false, true);
if ($iflist[$interfacefilter])
$interfacefilter = $iflist[$interfacefilter];
- if ($filterlogentries_submit)
+ if ($filterlogentries_submit)
$filterlog = conv_log_filter($filter_logfile, $nentries, $nentries + 100, $filterfieldsarray);
else
$filterlog = conv_log_filter($filter_logfile, $nentries, $nentries + 100, $filtertext, $interfacefilter);
@@ -314,7 +314,7 @@ include("head.inc");
printf(gettext("Last %s firewall log entries."),count($filterlog));
else
echo count($filterlog). ' ' . gettext("matched log entries.") . ' ';
- printf(gettext("Max(%s)"),$nentries);?>
+ printf(gettext("Max(%s)"),$nentries);?>
</td>
</tr>
<tr class="sortableHeaderRowIdentifier">
@@ -332,7 +332,7 @@ include("head.inc");
if ($config['syslog']['filterdescriptions'])
buffer_rules_load();
$rowIndex = 0;
- foreach ($filterlog as $filterent):
+ foreach ($filterlog as $filterent):
$evenRowClass = $rowIndex % 2 ? " listMReven" : " listMRodd";
$rowIndex++;?>
<tr class="<?=$evenRowClass?>">
@@ -347,10 +347,10 @@ include("head.inc");
<img border="0" src="/themes/<?= $g['theme']; ?>/images/icons/out.gif" alt="Direction=OUT" title="Direction=OUT"/>
<?php endif; ?>
<?php echo htmlspecialchars($filterent['interface']);?></td>
- <?php
+ <?php
if ($config['syslog']['filterdescriptions'] === "1")
echo("<td class=\"listMRr nowrap\">".find_rule_by_number_buffer($filterent['rulenum'],$filterent['tracker'],$filterent['act'])."</td>");
-
+
$int = strtolower($filterent['interface']);
$proto = strtolower($filterent['proto']);
if($filterent['version'] == '6') {
@@ -358,7 +358,7 @@ include("head.inc");
$filterent['srcip'] = "[{$filterent['srcip']}]";
$filterent['dstip'] = "[{$filterent['dstip']}]";
} else {
- $ipproto = "inet";
+ $ipproto = "inet";
}
$srcstr = $filterent['srcip'] . get_port_with_service($filterent['srcport'], $proto);
@@ -390,7 +390,7 @@ include("head.inc");
<td colspan="4" class="listMRDescriptionR listMRr nowrap"><?=find_rule_by_number_buffer($filterent['rulenum'],$filterent['tracker'],$filterent['act']);?></td>
</tr>
<?php endif;
- endforeach;
+ endforeach;
buffer_rules_clear(); ?>
<?php else: ?>
<tr>
@@ -444,18 +444,18 @@ function resolve_ip_callback(transport) {
var response = jQuery.parseJSON(transport.responseText);
var resolve_class = htmlspecialchars(response.resolve_ip.replace(/[.:]/g, '-'));
var resolve_text = '<small><br />' + htmlspecialchars(response.resolve_text) + '<\/small>';
-
+
jQuery('span.RESOLVE-' + resolve_class).html(resolve_text);
jQuery('img.ICON-' + resolve_class).removeAttr('title');
jQuery('img.ICON-' + resolve_class).removeAttr('alt');
jQuery('img.ICON-' + resolve_class).attr('src', '/themes/<?= $g['theme']; ?>/images/icons/icon_log_d.gif');
- jQuery('img.ICON-' + resolve_class).prop('onclick', null);
+ jQuery('img.ICON-' + resolve_class).prop('onclick', null);
// jQuery cautions that "removeAttr('onclick')" fails in some versions of IE
}
// From http://stackoverflow.com/questions/5499078/fastest-method-to-escape-html-tags-as-html-entities
function htmlspecialchars(str) {
- return str.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&apos;');
+ return str.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&apos;');
}
//]]>
</script>
diff --git a/usr/local/www/diag_logs_filter_dynamic.php b/usr/local/www/diag_logs_filter_dynamic.php
index c9fe2e3..4a828bf 100755
--- a/usr/local/www/diag_logs_filter_dynamic.php
+++ b/usr/local/www/diag_logs_filter_dynamic.php
@@ -114,19 +114,19 @@ include("head.inc");
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="logs filter dynamic">
<tr><td>
<?php
- $tab_array = array();
- $tab_array[] = array(gettext("System"), false, "diag_logs.php");
- $tab_array[] = array(gettext("Firewall"), true, "diag_logs_filter.php");
- $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
- $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
- $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
- $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
- $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
- $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
- $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
- $tab_array[] = array(gettext("NTP"), false, "diag_logs_ntpd.php");
- $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
- display_top_tabs($tab_array);
+$tab_array = array();
+$tab_array[] = array(gettext("System"), false, "diag_logs.php");
+$tab_array[] = array(gettext("Firewall"), true, "diag_logs_filter.php");
+$tab_array[] = array(gettext("DHCP"), false, "diag_logs.php?logfile=dhcpd");
+$tab_array[] = array(gettext("Portal Auth"), false, "diag_logs.php?logfile=portalauth");
+$tab_array[] = array(gettext("IPsec"), false, "diag_logs.php?logfile=ipsec");
+$tab_array[] = array(gettext("PPP"), false, "diag_logs.php?logfile=ppp");
+$tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
+$tab_array[] = array(gettext("Load Balancer"), false, "diag_logs.php?logfile=relayd");
+$tab_array[] = array(gettext("OpenVPN"), false, "diag_logs.php?logfile=openvpn");
+$tab_array[] = array(gettext("NTP"), false, "diag_logs.php?logfile=ntpd");
+$tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
+display_top_tabs($tab_array);
?>
</td></tr>
<tr><td class="tabnavtbl">
diff --git a/usr/local/www/diag_logs_filter_summary.php b/usr/local/www/diag_logs_filter_summary.php
index 0abe6d7..32ec431 100644
--- a/usr/local/www/diag_logs_filter_summary.php
+++ b/usr/local/www/diag_logs_filter_summary.php
@@ -185,19 +185,19 @@ include("head.inc"); ?>
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="logs filter summary">
<tr><td>
<?php
- $tab_array = array();
- $tab_array[] = array(gettext("System"), false, "diag_logs.php");
- $tab_array[] = array(gettext("Firewall"), true, "diag_logs_filter.php");
- $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
- $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
- $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
- $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
- $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
- $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
- $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
- $tab_array[] = array(gettext("NTP"), false, "diag_logs_ntpd.php");
- $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
- display_top_tabs($tab_array);
+$tab_array = array();
+$tab_array[] = array(gettext("System"), false, "diag_logs.php");
+$tab_array[] = array(gettext("Firewall"), true, "diag_logs_filter.php");
+$tab_array[] = array(gettext("DHCP"), false, "diag_logs.php?logfile=dhcpd");
+$tab_array[] = array(gettext("Portal Auth"), false, "diag_logs.php?logfile=portalauth");
+$tab_array[] = array(gettext("IPsec"), false, "diag_logs.php?logfile=ipsec");
+$tab_array[] = array(gettext("PPP"), false, "diag_logs.php?logfile=ppp");
+$tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
+$tab_array[] = array(gettext("Load Balancer"), false, "diag_logs.php?logfile=relayd");
+$tab_array[] = array(gettext("OpenVPN"), false, "diag_logs.php?logfile=openvpn");
+$tab_array[] = array(gettext("NTP"), false, "diag_logs.php?logfile=ntpd");
+$tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
+display_top_tabs($tab_array);
?>
</td></tr>
<tr><td class="tabnavtbl">
diff --git a/usr/local/www/diag_logs_gateways.php b/usr/local/www/diag_logs_gateways.php
deleted file mode 100755
index bd3f0a7..0000000
--- a/usr/local/www/diag_logs_gateways.php
+++ /dev/null
@@ -1,140 +0,0 @@
-<?php
-/* $Id$ */
-/*
- diag_logs_gateways.php
- Copyright (C) 2004-2009 Scott Ullrich
- Copyright (C) 2012 Seth Mos
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- originally part of m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- 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
- 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: system
-*/
-
-##|+PRIV
-##|*IDENT=page-diagnostics-logs-gateways
-##|*NAME=Diagnostics: Logs: System: Gateways page
-##|*DESCR=Allow access to the 'Diagnostics: Logs: System: Gateways' page.
-##|*MATCH=diag_logs_gateways.php*
-##|-PRIV
-
-require("guiconfig.inc");
-
-$system_logfile = "{$g['varlog_path']}/gateways.log";
-
-$nentries = $config['syslog']['nentries'];
-if (!$nentries)
- $nentries = 50;
-
-if ($_POST['clear'])
- clear_log_file($system_logfile);
-
-if ($_GET['filtertext'])
- $filtertext = htmlspecialchars($_GET['filtertext']);
-
-if ($_POST['filtertext'])
- $filtertext = htmlspecialchars($_POST['filtertext']);
-
-if ($filtertext)
- $filtertextmeta="?filtertext=$filtertext";
-
-$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Gateways"));
-$shortcut_section = "gateways";
-include("head.inc");
-
-?>
-
-<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-<?php include("fbegin.inc"); ?>
-<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="logs system gateways">
- <tr>
- <td>
-<?php
- $tab_array = array();
- $tab_array[] = array(gettext("System"), true, "diag_logs.php");
- $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
- $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
- $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
- $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
- $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
- $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
- $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
- $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
- $tab_array[] = array(gettext("NTP"), false, "diag_logs_ntpd.php");
- $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
- display_top_tabs($tab_array);
-?>
- </td>
- </tr>
- <tr><td class="tabnavtbl">
-<?php
- $tab_array = array();
- $tab_array[] = array(gettext("General"), false, "/diag_logs.php");
- $tab_array[] = array(gettext("Gateways"), true, "/diag_logs_gateways.php");
- $tab_array[] = array(gettext("Routing"), false, "/diag_logs_routing.php");
- $tab_array[] = array(gettext("Resolver"), false, "/diag_logs_resolver.php");
- $tab_array[] = array(gettext("Wireless"), false, "/diag_logs_wireless.php");
- display_top_tabs($tab_array);
-?>
- </td>
- </tr>
- <tr>
- <td>
- <div id="mainarea">
- <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0" summary="main area">
- <tr>
- <td colspan="2" class="listtopic"><?php printf(gettext("Last %s system log entries"),$nentries); ?></td>
- </tr>
- <?php
- if($filtertext)
- dump_clog($system_logfile, $nentries, true, array("$filtertext"));
- else
- dump_clog($system_logfile, $nentries, true, array());
- ?>
- <tr>
- <td align="left" valign="top">
- <form id="filterform" name="filterform" action="diag_logs_gateways.php" method="post" style="margin-top: 14px;">
- <input id="submit" name="clear" type="submit" class="formbtn" value="<?=gettext("Clear log");?>" />
- </form>
- </td>
- <td align="right" valign="top" >
- <form id="clearform" name="clearform" action="diag_logs_gateways.php" method="post" style="margin-top: 14px;">
- <input id="filtertext" name="filtertext" value="<?=$filtertext;?>" />
- <input id="filtersubmit" name="filtersubmit" type="submit" class="formbtn" value="<?=gettext("Filter");?>" />
- </form>
- </td>
- </tr>
- </table>
- </div>
- </td>
- </tr>
-</table>
-<?php include("fend.inc"); ?>
-</body>
-</html>
diff --git a/usr/local/www/diag_logs_ipsec.php b/usr/local/www/diag_logs_ipsec.php
deleted file mode 100644
index 7966918..0000000
--- a/usr/local/www/diag_logs_ipsec.php
+++ /dev/null
@@ -1,121 +0,0 @@
-<?php
-/* $Id$ */
-/*
- diag_logs_ipsec.php
- Copyright (C) 2004-2009 Scott Ullrich
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- originally part of m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- 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
- 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_BUILDER_BINARIES: /sbin/ifconfig /usr/bin/awk
- pfSense_MODULE: ipsec
-*/
-
-##|+PRIV
-##|*IDENT=page-status-systemlogs-ipsecvpn
-##|*NAME=Status: System logs: IPsec VPN page
-##|*DESCR=Allow access to the 'Status: System logs: IPsec VPN' page.
-##|*MATCH=diag_logs_ipsec.php*
-##|-PRIV
-
-require("guiconfig.inc");
-require("ipsec.inc");
-
-$ipsec_logfile = "{$g['varlog_path']}/ipsec.log";
-
-$nentries = $config['syslog']['nentries'];
-if (!$nentries)
- $nentries = 50;
-
-if ($_POST['clear'])
- clear_log_file($ipsec_logfile);
-
-$ipsec_logarr = return_clog($ipsec_logfile, $nentries);
-
-$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("IPsec VPN"));
-$shortcut_section = "ipsec";
-include("head.inc");
-
-?>
-<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-<?php include("fbegin.inc"); ?>
-<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="logs ipsec">
- <tr>
- <td>
-<?php
- $tab_array = array();
- $tab_array[] = array(gettext("System"), false, "diag_logs.php");
- $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
- $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
- $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
- $tab_array[] = array(gettext("IPsec"), true, "diag_logs_ipsec.php");
- $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
- $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
- $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
- $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
- $tab_array[] = array(gettext("NTP"), false, "diag_logs_ntpd.php");
- $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
- display_top_tabs($tab_array);
-?>
- </td>
- </tr>
- <tr>
- <td>
- <div id="mainarea">
- <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0" summary="main area">
- <tr>
- <td colspan="2" class="listtopic"><?php printf(gettext("Last %s IPsec log entries"),$nentries);?></td>
- </tr>
- <?php
- foreach($ipsec_logarr as $logent){
- $logent = htmlspecialchars($logent);
- $logent = preg_split("/\s+/", $logent, 6);
- echo "<tr valign=\"top\">\n";
- $entry_date_time = htmlspecialchars(join(" ", array_slice($logent, 0, 3)));
- echo "<td class=\"listlr nowrap\">" . $entry_date_time . "</td>\n";
- echo "<td class=\"listr\">" . $logent[4] . " " . $logent[5] . "</td>\n";
- echo "</tr>\n";
- }
- ?>
- <tr>
- <td>
- <br />
- <form action="diag_logs_ipsec.php" method="post">
- <input name="clear" type="submit" class="formbtn" value="<?=gettext("Clear log"); ?>" />
- </form>
- </td>
- </tr>
- </table>
- </div>
- </td>
- </tr>
-</table>
-<?php include("fend.inc"); ?>
-</body>
-</html>
diff --git a/usr/local/www/diag_logs_ntpd.php b/usr/local/www/diag_logs_ntpd.php
deleted file mode 100644
index 0754dcb..0000000
--- a/usr/local/www/diag_logs_ntpd.php
+++ /dev/null
@@ -1,102 +0,0 @@
-<?php
-/* $Id$ */
-/*
- diag_logs_ntpd.php
- part of pfSense
- Copyright (C) 2005 Bill Marquette <bill.marquette@gmail.com>.
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- 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
- 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: ntpd
-*/
-
-##|+PRIV
-##|*IDENT=page-status-systemlogs-ntpd
-##|*NAME=Status: System logs: NTP page
-##|*DESCR=Allow access to the 'Status: System logs: NTP' page.
-##|*MATCH=diag_logs_ntpd.php*
-##|-PRIV
-
-require("guiconfig.inc");
-
-$ntpd_logfile = "{$g['varlog_path']}/ntpd.log";
-
-$nentries = $config['syslog']['nentries'];
-if (!$nentries)
- $nentries = 50;
-
-if ($_POST['clear'])
- clear_log_file($ntpd_logfile);
-
-$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("NTP"));
-$shortcut_section = "ntp";
-include("head.inc");
-
-?>
-
-<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-<?php include("fbegin.inc"); ?>
-<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="logs ntpd">
- <tr><td>
-<?php
- $tab_array = array();
- $tab_array[] = array(gettext("System"), false, "diag_logs.php");
- $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
- $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
- $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
- $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
- $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
- $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
- $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
- $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
- $tab_array[] = array(gettext("NTP"), true, "diag_logs_ntpd.php");
- $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
- display_top_tabs($tab_array);
-?>
- </td></tr>
- <tr>
- <td>
- <div id="mainarea">
- <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0" summary="main area">
- <tr>
- <td colspan="2" class="listtopic">
- <?php printf(gettext("Last %s NTP log entries"), $nentries);?></td>
- </tr>
- <?php dump_clog($ntpd_logfile, $nentries); ?>
- <tr><td><br />
- <form action="diag_logs_ntpd.php" method="post">
- <input name="clear" type="submit" class="formbtn" value="<?=gettext("Clear log"); ?>" />
-</form>
-</td></tr>
- </table>
- </div>
- </td>
- </tr>
-</table>
-<?php include("fend.inc"); ?>
-</body>
-</html>
diff --git a/usr/local/www/diag_logs_openvpn.php b/usr/local/www/diag_logs_openvpn.php
deleted file mode 100644
index feda5ca..0000000
--- a/usr/local/www/diag_logs_openvpn.php
+++ /dev/null
@@ -1,109 +0,0 @@
-<?php
-/* $Id$ */
-/*
- diag_logs_openvpn.php
- Copyright (C) 2004-2009 Scott Ullrich
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- originally part of m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- 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
- 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: openvpn
-*/
-
-##|+PRIV
-##|*IDENT=page-status-systemlogs-openvpn
-##|*NAME=Status: System logs: OpenVPN page
-##|*DESCR=Allow access to the 'Status: System logs: OpenVPN' page.
-##|*MATCH=diag_logs_openvpn.php*
-##|-PRIV
-
-$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("OpenVPN"));
-$shortcut_section = "openvpn";
-
-require("guiconfig.inc");
-require_once("vpn.inc");
-
-$openvpn_logfile = "{$g['varlog_path']}/openvpn.log";
-
-$nentries = $config['syslog']['nentries'];
-if (!$nentries)
- $nentries = 50;
-
-if ($_POST['clear'])
- clear_log_file($openvpn_logfile);
-
-include("head.inc");
-
-?>
-<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-<?php include("fbegin.inc"); ?>
-<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="logs openvpn">
- <tr>
- <td>
-<?php
- $tab_array = array();
- $tab_array[] = array(gettext("System"), false, "diag_logs.php");
- $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
- $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
- $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
- $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
- $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
- $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
- $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
- $tab_array[] = array(gettext("OpenVPN"), true, "diag_logs_openvpn.php");
- $tab_array[] = array(gettext("NTP"), false, "diag_logs_ntpd.php");
- $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
- display_top_tabs($tab_array);
-?>
- </td>
- </tr>
- <tr>
- <td>
- <div id="mainarea">
- <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0" summary="main area">
- <tr>
- <td colspan="2" class="listtopic"><?php printf(gettext("Last %s OpenVPN log entries"),$nentries)?></td>
- </tr>
- <?php dump_clog($openvpn_logfile, $nentries); ?>
- <tr>
- <td>
- <br />
- <form action="diag_logs_openvpn.php" method="post">
- <input name="clear" type="submit" class="formbtn" value="<?=gettext("Clear log"); ?>" />
- </form>
- </td>
- </tr>
- </table>
- </div>
- </td>
- </tr>
-</table>
-<?php include("fend.inc"); ?>
-</body>
-</html>
diff --git a/usr/local/www/diag_logs_ppp.php b/usr/local/www/diag_logs_ppp.php
deleted file mode 100644
index 8a53214..0000000
--- a/usr/local/www/diag_logs_ppp.php
+++ /dev/null
@@ -1,107 +0,0 @@
-<?php
-/* $Id$ */
-/*
- diag_logs_ppp.php
- Copyright (C) 2004-2009 Scott Ullrich
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- originally part of m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- 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
- 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_BUILDER_BINARIES: /sbin/ifconfig /usr/bin/awk
- pfSense_MODULE:
-*/
-
-##|+PRIV
-##|*IDENT=page-status-systemlogs-ppp
-##|*NAME=Status: System logs: IPsec VPN page
-##|*DESCR=Allow access to the 'Status: System logs: IPsec VPN' page.
-##|*MATCH=diag_logs_ppp.php*
-##|-PRIV
-
-require("guiconfig.inc");
-
-$ppp_logfile = "{$g['varlog_path']}/ppp.log";
-
-$nentries = $config['syslog']['nentries'];
-if (!$nentries)
- $nentries = 50;
-
-if ($_POST['clear'])
- clear_log_file($ppp_logfile);
-
-$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("PPP"));
-include("head.inc");
-
-?>
-<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-<?php include("fbegin.inc"); ?>
-<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="logs ppp">
- <tr>
- <td>
-<?php
- $tab_array = array();
- $tab_array[] = array(gettext("System"), false, "diag_logs.php");
- $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
- $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
- $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
- $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
- $tab_array[] = array(gettext("PPP"), true, "diag_logs_ppp.php");
- $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
- $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
- $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
- $tab_array[] = array(gettext("NTP"), false, "diag_logs_ntpd.php");
- $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
- display_top_tabs($tab_array);
-?>
- </td>
- </tr>
- <tr>
- <td>
- <div id="mainarea">
- <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0" summary="main area">
- <tr>
- <td colspan="2" class="listtopic"><?php printf(gettext("Last %s PPP log entries"),$nentries);?></td>
- </tr>
- <?php dump_clog($ppp_logfile, $nentries); ?>
- <tr>
- <td>
- <br />
- <form action="diag_logs_ppp.php" method="post">
- <input name="clear" type="submit" class="formbtn" value="<?=gettext("Clear log"); ?>" />
- </form>
- </td>
- </tr>
- </table>
- </div>
- </td>
- </tr>
-</table>
-<?php include("fend.inc"); ?>
-</body>
-</html>
diff --git a/usr/local/www/diag_logs_relayd.php b/usr/local/www/diag_logs_relayd.php
deleted file mode 100644
index e44b082..0000000
--- a/usr/local/www/diag_logs_relayd.php
+++ /dev/null
@@ -1,100 +0,0 @@
-<?php
-/* $Id$ */
-/*
- diag_logs_relayd.php
- part of pfSense
-
- Copyright (C) 2008 Bill Marquette <bill.marquette@gmail.com>.
- Copyright (C) 2008 Seth Mos <seth.mos@dds.nl>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- 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
- 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: routing
-*/
-
-##|+PRIV
-##|*IDENT=page-status-systemlogs-loadbalancer
-##|*NAME=Status: System logs: Load Balancer page
-##|*DESCR=Allow access to the 'Status: System logs: Load Balancer' page.
-##|*MATCH=diag_logs_relayd.php*
-##|-PRIV
-
-require("guiconfig.inc");
-
-$relayd_logfile = "{$g['varlog_path']}/relayd.log";
-
-$nentries = $config['syslog']['nentries'];
-if (!$nentries)
- $nentries = 50;
-
-if ($_POST['clear'])
- clear_log_file($relayd_logfile);
-
-$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Load Balancer"));
-$shortcut_section = "relayd";
-include("head.inc");
-
-?>
-
-<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-<?php include("fbegin.inc"); ?>
-<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="load balancer">
- <tr><td>
-<?php
- $tab_array = array();
- $tab_array[] = array(gettext("System"), false, "diag_logs.php");
- $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
- $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
- $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
- $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
- $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
- $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
- $tab_array[] = array(gettext("Load Balancer"), true, "diag_logs_relayd.php");
- $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
- $tab_array[] = array(gettext("NTP"), false, "diag_logs_ntpd.php");
- $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
- display_top_tabs($tab_array);
-?>
- </td></tr>
- <tr>
- <td>
- <div id="mainarea">
- <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0" summary="main area">
- <tr>
- <td colspan="2" class="listtopic">
- <?php printf(gettext("Last %s Load Balancer log entries"),$nentries);?></td>
- </tr>
- <?php dump_clog($relayd_logfile, $nentries); ?>
- <tr><td><br /><form action="diag_logs_relayd.php" method="post">
-<input name="clear" type="submit" class="formbtn" value="<?=gettext("Clear log"); ?>" /></form></td></tr>
- </table>
- </div>
- </td>
- </tr>
-</table>
-<?php include("fend.inc"); ?>
-</body>
-</html>
diff --git a/usr/local/www/diag_logs_resolver.php b/usr/local/www/diag_logs_resolver.php
deleted file mode 100755
index dd8f74a..0000000
--- a/usr/local/www/diag_logs_resolver.php
+++ /dev/null
@@ -1,144 +0,0 @@
-<?php
-/* $Id$ */
-/*
- diag_logs_resolver.php
- Copyright (C) 2004-2009 Scott Ullrich
- Copyright (C) 2012 Seth Mos
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- originally part of m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- 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
- 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: system
-*/
-
-##|+PRIV
-##|*IDENT=page-diagnostics-logs-resolver
-##|*NAME=Diagnostics: Logs: System: Resolver page
-##|*DESCR=Allow access to the 'Diagnostics: Logs: System: Resolver' page.
-##|*MATCH=diag_logs_resolver.php*
-##|-PRIV
-
-require("guiconfig.inc");
-
-$system_logfile = "{$g['varlog_path']}/resolver.log";
-
-$nentries = $config['syslog']['nentries'];
-if (!$nentries)
- $nentries = 50;
-
-if ($_POST['clear'])
- clear_log_file($system_logfile);
-
-if ($_GET['filtertext'])
- $filtertext = htmlspecialchars($_GET['filtertext']);
-
-if ($_POST['filtertext'])
- $filtertext = htmlspecialchars($_POST['filtertext']);
-
-if ($filtertext)
- $filtertextmeta="?filtertext=$filtertext";
-
-$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Resolver"));
-if (isset($config['dnsmasq']['enable']))
- $shortcut_section = "forwarder";
-else
- $shortcut_section = "resolver";
-
-include("head.inc");
-
-?>
-
-<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-<?php include("fbegin.inc"); ?>
-<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="logs system resolver">
- <tr>
- <td>
-<?php
- $tab_array = array();
- $tab_array[] = array(gettext("System"), true, "diag_logs.php");
- $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
- $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
- $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
- $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
- $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
- $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
- $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
- $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
- $tab_array[] = array(gettext("NTP"), false, "diag_logs_ntpd.php");
- $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
- display_top_tabs($tab_array);
-?>
- </td>
- </tr>
- <tr><td class="tabnavtbl">
-<?php
- $tab_array = array();
- $tab_array[] = array(gettext("General"), false, "/diag_logs.php");
- $tab_array[] = array(gettext("Gateways"), false, "/diag_logs_gateways.php");
- $tab_array[] = array(gettext("Routing"), false, "/diag_logs_routing.php");
- $tab_array[] = array(gettext("Resolver"), true, "/diag_logs_resolver.php");
- $tab_array[] = array(gettext("Wireless"), false, "/diag_logs_wireless.php");
- display_top_tabs($tab_array);
-?>
- </td>
- </tr>
- <tr>
- <td>
- <div id="mainarea">
- <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0" summary="main area">
- <tr>
- <td colspan="2" class="listtopic"><?php printf(gettext("Last %s system log entries"),$nentries); ?></td>
- </tr>
- <?php
- if($filtertext)
- dump_clog($system_logfile, $nentries, true, array("$filtertext"), array("ppp"));
- else
- dump_clog($system_logfile, $nentries, true, array(), array("ppp"));
- ?>
- <tr>
- <td align="left" valign="top">
- <form id="filterform" name="filterform" action="diag_logs_resolver.php" method="post" style="margin-top: 14px;">
- <input id="submit" name="clear" type="submit" class="formbtn" value="<?=gettext("Clear log");?>" />
- </form>
- </td>
- <td align="right" valign="top" >
- <form id="clearform" name="clearform" action="diag_logs_resolver.php" method="post" style="margin-top: 14px;">
- <input id="filtertext" name="filtertext" value="<?=$filtertext;?>" />
- <input id="filtersubmit" name="filtersubmit" type="submit" class="formbtn" value="<?=gettext("Filter");?>" />
- </form>
- </td>
- </tr>
- </table>
- </div>
- </td>
- </tr>
-</table>
-<?php include("fend.inc"); ?>
-</body>
-</html>
diff --git a/usr/local/www/diag_logs_routing.php b/usr/local/www/diag_logs_routing.php
deleted file mode 100644
index bb14680..0000000
--- a/usr/local/www/diag_logs_routing.php
+++ /dev/null
@@ -1,111 +0,0 @@
-<?php
-/* $Id$ */
-/*
- diag_logs_routing.php
- part of pfSense
-
- Copyright (C) 2012 Jim Pingle <jimp@pfsense.org>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- 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
- 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: routing
-*/
-
-##|+PRIV
-##|*IDENT=page-status-systemlogs-routing
-##|*NAME=Status: System logs: Routing page
-##|*DESCR=Allow access to the 'Status: System logs: System: Routing' page.
-##|*MATCH=diag_logs_routing.php*
-##|-PRIV
-
-require("guiconfig.inc");
-
-$routing_logfile = "{$g['varlog_path']}/routing.log";
-
-$nentries = $config['syslog']['nentries'];
-if (!$nentries)
- $nentries = 50;
-
-if ($_POST['clear'])
- clear_log_file($routing_logfile);
-
-$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Routing"));
-$shortcut_section = "routing";
-include("head.inc");
-
-?>
-
-<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-<?php include("fbegin.inc"); ?>
-<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="logs system routing">
- <tr><td>
-<?php
- $tab_array = array();
- $tab_array[] = array(gettext("System"), true, "diag_logs.php");
- $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
- $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
- $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
- $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
- $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
- $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
- $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
- $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
- $tab_array[] = array(gettext("NTP"), false, "diag_logs_ntpd.php");
- $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
- display_top_tabs($tab_array);
-?>
- </td></tr>
- <tr><td class="tabnavtbl">
-<?php
- $tab_array = array();
- $tab_array[] = array(gettext("General"), false, "/diag_logs.php");
- $tab_array[] = array(gettext("Gateways"), false, "/diag_logs_gateways.php");
- $tab_array[] = array(gettext("Routing"), true, "/diag_logs_routing.php");
- $tab_array[] = array(gettext("Resolver"), false, "/diag_logs_resolver.php");
- $tab_array[] = array(gettext("Wireless"), false, "/diag_logs_wireless.php");
- display_top_tabs($tab_array);
-?>
- </td>
- </tr>
- <tr>
- <td>
- <div id="mainarea">
- <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0" summary="main area">
- <tr>
- <td colspan="2" class="listtopic">
- <?php printf(gettext("Routing daemon log entries"),$nentries);?></td>
- </tr>
- <?php dump_clog($routing_logfile, $nentries); ?>
- <tr><td><br /><form action="diag_logs_routing.php" method="post">
-<input name="clear" type="submit" class="formbtn" value="<?=gettext("Clear log"); ?>" /></form></td></tr>
- </table>
- </div>
- </td>
- </tr>
-</table>
-<?php include("fend.inc"); ?>
-</body>
-</html>
diff --git a/usr/local/www/diag_logs_settings.php b/usr/local/www/diag_logs_settings.php
index 2cfc11d..e7bbf70 100644
--- a/usr/local/www/diag_logs_settings.php
+++ b/usr/local/www/diag_logs_settings.php
@@ -205,14 +205,14 @@ else if ($savemsg)
$tab_array = array();
$tab_array[] = array(gettext("System"), false, "diag_logs.php");
$tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
-$tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
-$tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
-$tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
-$tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
+$tab_array[] = array(gettext("DHCP"), false, "diag_logs.php?logfile=dhcpd");
+$tab_array[] = array(gettext("Portal Auth"), false, "diag_logs.php?logfile=portalauth");
+$tab_array[] = array(gettext("IPsec"), false, "diag_logs.php?logfile=ipsec");
+$tab_array[] = array(gettext("PPP"), false, "diag_logs.php?logfile=ppp");
$tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
-$tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
-$tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
-$tab_array[] = array(gettext("NTP"), false, "diag_logs_ntpd.php");
+$tab_array[] = array(gettext("Load Balancer"), false, "diag_logs.php?logfile=relayd");
+$tab_array[] = array(gettext("OpenVPN"), false, "diag_logs.php?logfile=openvpn");
+$tab_array[] = array(gettext("NTP"), false, "diag_logs.php?logfile=ntpd");
$tab_array[] = array(gettext("Settings"), true, "diag_logs_settings.php");
display_top_tabs($tab_array);
@@ -223,6 +223,7 @@ $form = new Form(new Form_Button(
gettext("Save")
));
+// General logging section ------------------------------------------------
$section = new Form_Section('General Logging Options');
$section->addInput(new Form_Checkbox(
@@ -312,24 +313,29 @@ $section->addInput(new Form_Checkbox(
$section->addInput(new Form_Button(
'resetlogs',
'Reset Log Files'
-))->addClass('btn-danger btn-xs')->setHelp('Clears all local log files and reinitializes them as empty logs. This also restarts the DHCP daemon. Use the Save button first if you have made any setting changes.');
+))->addClass("btn-danger btn-xs")->setHelp('Clears all local log files and reinitializes them as empty logs. This also restarts the DHCP daemon. Use the Save button first if you have made any setting changes.');
$form->add($section);
+
+// Remote logging section ------------------------------------------------
$section = new Form_Section('Remote Logging Options');
-$section->addClass('toggle-remote');
-$section->addInput(new Form_Checkbox(
- 'enable',
- 'Enable Remote Logging',
- 'Send log messages to remote syslog server',
- $pconfig['enable']
-))->toggles('.toggle-remote .panel-body .form-group:not(:first-child)');
+$sourceips = get_possible_traffic_source_addresses(false);
+
+$selected = "";
+
+foreach ($sourceips as $sa) {
+ $rllist[$sa['value']] = $sa['name'];
+
+ if (!link_interface_to_bridge($sa['value']) && ($sa['value'] == $pconfig['sourceip']))
+ $selected = $sa['value'];
+}
$section->addInput(new Form_Select(
'sourceip',
'Source Address',
- link_interface_to_bridge($pconfig['sourceip']) ? null : $pconfig['sourceip'],
- get_possible_traffic_source_addresses(false)
+ $selected,
+ $rllist
))->setHelp($remoteloghelp);
$section->addInput(new Form_Select(
@@ -339,8 +345,19 @@ $section->addInput(new Form_Select(
array('ipv4' => 'IPv4', 'ipv6' => 'IPv6')
))->setHelp('This option is only used when a non-default address is chosen as the source above. This option only expresses a preference; If an IP address of the selected type is not found on the chosen interface, the other type will be tried.');
+$section->addInput(new Form_Checkbox(
+ 'enable',
+ 'Enable Remote Logging',
+ 'Send log messages to remote syslog server',
+ $pconfig['enable']
+))->toggles('.toggle-remote');
+
// Group colapses/appears based on 'enable' checkbox above
$group = new Form_Group('Remote log servers');
+$group->addClass('toggle-remote', 'collapse');
+
+if ($pconfig['enable'])
+ $group->addClass('in');
$group->add(new Form_Input(
'remoteserver',
@@ -368,70 +385,73 @@ $group->add(new Form_Input(
$section->add($group);
-$group = new Form_Group('Remote Syslog Contents');
+$group = new Form_Group('');
+$group->addClass('toggle-remote', 'collapse');
+
+if ($pconfig['enable'])
+ $group->addClass('in');
+
$group->add(new Form_Checkbox(
'system',
- null,
+ '',
'System Events',
$pconfig['system']
));
$group->add(new Form_Checkbox(
'filter',
- null,
+ '',
'Firewall Events',
$pconfig['filter']
));
$group->add(new Form_Checkbox(
'dhcp',
- null,
+ '',
'DHCP service events',
$pconfig['dhcp']
));
$group->add(new Form_Checkbox(
'portalauth',
- null,
+ '',
'Portal Auth events',
$pconfig['portalauth']
));
$group->add(new Form_Checkbox(
'vpn',
- null,
+ '',
'VPN (PPTP, IPsec, OpenVPN) events',
$pconfig['vpn']
));
$group->add(new Form_Checkbox(
'apinger',
- null,
+ '',
'Gateway Monitor events',
$pconfig['apinger']
));
$group->add(new Form_Checkbox(
'relayd',
- null,
+ '',
'Server Load Balancer events',
$pconfig['relayd']
));
$group->add(new Form_Checkbox(
'hostapd',
- null,
+ '',
'Wireless events',
$pconfig['hostapd']
));
-$group->setHelp('syslog sends UDP datagrams to port 514 on the specified remote '.
- 'syslog server, unless another port is specified. Be sure to set syslogd on '.
- 'the remote server to accept syslog messages from pfSense.');
+$group->setHelp('<strong>Note</strong>' . 'syslog sends UDP datagrams to port 514 on the specified remote syslog server, unless another port is specified. Be sure to set syslogd on the remote server to accept syslog messages frompfSense.');
$section->add($group);
$form->add($section);
print $form;
-include("foot.inc"); \ No newline at end of file
+include("foot.inc"); ?>
diff --git a/usr/local/www/diag_logs_vpn.php b/usr/local/www/diag_logs_vpn.php
index 6a7a7f8..546e1fe 100755
--- a/usr/local/www/diag_logs_vpn.php
+++ b/usr/local/www/diag_logs_vpn.php
@@ -123,19 +123,20 @@ include("head.inc");
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="logs vpn">
<tr><td class="tabnavtbl">
<?php
- $tab_array = array();
- $tab_array[] = array(gettext("System"), false, "diag_logs.php");
- $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
- $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
- $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
- $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
- $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
- $tab_array[] = array(gettext("VPN"), true, "diag_logs_vpn.php");
- $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
- $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
- $tab_array[] = array(gettext("NTP"), false, "diag_logs_ntpd.php");
- $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
- display_top_tabs($tab_array);
+
+$tab_array = array();
+$tab_array[] = array(gettext("System"), false, "diag_logs.php");
+$tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
+$tab_array[] = array(gettext("DHCP"), false, "diag_logs.php?logfile=dhcpd");
+$tab_array[] = array(gettext("Portal Auth"), false, "diag_logs.php?logfile=portalauth");
+$tab_array[] = array(gettext("IPsec"), false, "diag_logs.php?logfile=ipsec");
+$tab_array[] = array(gettext("PPP"), false, "diag_logs.php?logfile=ppp");
+$tab_array[] = array(gettext("VPN"), true, "diag_logs_vpn.php");
+$tab_array[] = array(gettext("Load Balancer"), false, "diag_logs.php?logfile=relayd");
+$tab_array[] = array(gettext("OpenVPN"), false, "diag_logs.php?logfile=openvpn");
+$tab_array[] = array(gettext("NTP"), false, "diag_logs.php?logfile=ntpd");
+$tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
+display_top_tabs($tab_array);
?>
</td></tr>
<tr><td class="tabnavtbl">
diff --git a/usr/local/www/diag_logs_wireless.php b/usr/local/www/diag_logs_wireless.php
deleted file mode 100644
index 5dfbf72..0000000
--- a/usr/local/www/diag_logs_wireless.php
+++ /dev/null
@@ -1,113 +0,0 @@
-<?php
-/* $Id$ */
-/*
- diag_logs_wireless.php
- part of pfSense
-
- Copyright (C) 2008 Bill Marquette <bill.marquette@gmail.com>.
- Copyright (C) 2008 Seth Mos <seth.mos@dds.nl>.
- Copyright (C) 2011 Jim Pingle <jimp@pfsense.org>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- 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
- 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: routing
-*/
-
-##|+PRIV
-##|*IDENT=page-status-systemlogs-wireless
-##|*NAME=Status: System logs: Wireless page
-##|*DESCR=Allow access to the 'Status: System logs: System: Wireless' page.
-##|*MATCH=diag_logs_wireless.php*
-##|-PRIV
-
-require("guiconfig.inc");
-
-$wireless_logfile = "{$g['varlog_path']}/wireless.log";
-
-$nentries = $config['syslog']['nentries'];
-if (!$nentries)
- $nentries = 50;
-
-if ($_POST['clear'])
- clear_log_file($wireless_logfile);
-
-$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Wireless"));
-$shortcut_section = "wireless";
-include("head.inc");
-
-?>
-
-<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-<?php include("fbegin.inc"); ?>
-<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="logs system wireless">
- <tr><td>
-<?php
- $tab_array = array();
- $tab_array[] = array(gettext("System"), true, "diag_logs.php");
- $tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
- $tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
- $tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
- $tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
- $tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
- $tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
- $tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
- $tab_array[] = array(gettext("OpenVPN"), false, "diag_logs_openvpn.php");
- $tab_array[] = array(gettext("NTP"), false, "diag_logs_ntpd.php");
- $tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
- display_top_tabs($tab_array);
-?>
- </td></tr>
- <tr><td class="tabnavtbl">
-<?php
- $tab_array = array();
- $tab_array[] = array(gettext("General"), false, "/diag_logs.php");
- $tab_array[] = array(gettext("Gateways"), false, "/diag_logs_gateways.php");
- $tab_array[] = array(gettext("Routing"), false, "/diag_logs_routing.php");
- $tab_array[] = array(gettext("Resolver"), false, "/diag_logs_resolver.php");
- $tab_array[] = array(gettext("Wireless"), true, "/diag_logs_wireless.php");
- display_top_tabs($tab_array);
-?>
- </td>
- </tr>
- <tr>
- <td>
- <div id="mainarea">
- <table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0" summary="main area">
- <tr>
- <td colspan="2" class="listtopic">
- <?php printf(gettext("Wireless (hostapd) log entries"),$nentries);?></td>
- </tr>
- <?php dump_clog($wireless_logfile, $nentries); ?>
- <tr><td><br /><form action="diag_logs_wireless.php" method="post">
-<input name="clear" type="submit" class="formbtn" value="<?=gettext("Clear log"); ?>" /></form></td></tr>
- </table>
- </div>
- </td>
- </tr>
-</table>
-<?php include("fend.inc"); ?>
-</body>
-</html>
OpenPOWER on IntegriCloud