Commit cc7e4247 authored by Franco Fichtner's avatar Franco Fichtner

logs: merge log/vpn template rework from master

parent 19a8e5ca
......@@ -47,13 +47,6 @@
<GroupStatus VisibleName="Group Status" url="/status_gateway_groups.php"/>
<Log VisibleName="Log File" url="/diag_logs_gateways.php"/>
</Gateways>
<LogFiles order="160" VisibleName="Log Files" cssClass="fa fa-eye">
<General url="/diag_logs.php"/>
<DHCP url="/diag_logs_dhcp.php"/>
<VPN url="/diag_logs_vpn.php?vpntype=pptp">
<Type url="/diag_logs_vpn.php*"/>
</VPN>
</LogFiles>
<Settings order="20" cssClass="fa fa-cogs">
<General order="100" url="/system_general.php"/>
<AdminAccess VisibleName="Admin Access" order="200" url="/system_advanced_admin.php"/>
......@@ -66,6 +59,7 @@
<Edit url="/system_advanced_sysctl.php*"/>
</Tunables>
</Settings>
<LogFile order="150" VisibleName="Log File" url="/diag_logs.php" cssClass="fa fa-eye"/>
<Wizard order="140" url="/wizard.php" cssClass="fa fa-magic">
<Step url="/wizard.php*"/>
</Wizard>
......@@ -84,8 +78,8 @@
</Servers>
<Tester order="50" url="/diag_authentication.php"/>
</Access>
<Diagnostics order="150" cssClass="fa fa-medkit">
<Activity VisibleName="Activity Monitor" url="/diag_system_activity.php"/>
<Diagnostics order="160" cssClass="fa fa-medkit">
<Activity VisibleName="Activity Monitor" url="/ui/diagnostics/activity/"/>
<Factory VisibleName="Factory Defaults" url="/diag_defaults.php"/>
<Halt VisibleName="Halt System" url="/diag_halt.php"/>
<Reboot VisibleName="Reboot System" url="/reboot.php"/>
......@@ -228,6 +222,7 @@
<Leases order="300" url="/status_dhcp_leases.php">
<Details url="/status_dhcp_leases.php?*"/>
</Leases>
<LogFile VisibleName="Log File" order="400" url="/diag_logs_dhcp.php"/>
</DHCP>
<DHCPv6 cssClass="fa fa-bullseye">
<Server order="100" url="/services_dhcpv6.php">
......@@ -288,15 +283,14 @@
<Status url="/status_ntpd.php"/>
<Log VisibleName="Log File" url="/diag_logs_ntpd.php"/>
</NTP>
<PPPoEServer VisibleName="PPPoE Server" url="/vpn_pppoe.php" cssClass="fa fa-tty">
<PPPoeServerEdit url="/vpn_pppoe_edit.php"/>
<PPPoEServer VisibleName="PPPoE Server" cssClass="fa fa-tty">
<Settings order="10" url="/vpn_pppoe.php">
<Edit url="/vpn_pppoe_edit.php*"/>
</Settings>
<LogFile order="20" VisibleName="Log File" url="/diag_logs_poes.php">
<Type url="/diag_logs_poes.php*"/>
</LogFile>
</PPPoEServer>
<PPTP cssClass="fa fa-unlock">
<Settings url="/vpn_pptp.php"/>
<Users url="/vpn_pptp_users.php">
<Edit url="/vpn_pptp_users_edit.php*"/>
</Users>
</PPTP>
<Proxy VisibleName="Proxy Server" cssClass="fa fa-bolt">
<Administration url="/ui/proxy/"/>
<Log VisibleName="Log File" url="/diag_logs_proxy.php?type=cache">
......@@ -314,7 +308,7 @@
<WoLEdit url="/services_wol_edit.php*"/>
</WoL>
</Services>
<VPN order="4" cssClass="glyphicon glyphicon-lock">
<VPN order="4" cssClass="fa fa-globe">
<IPsec cssClass="fa fa-lock">
<Tunnels order="10" VisibleName="Tunnel Settings" url="/vpn_ipsec.php">
<Phase1 url="/vpn_ipsec_phase1.php*"/>
......@@ -333,11 +327,14 @@
<SPD order="80" VisibleName="Security Policy Database" url="/diag_ipsec_spd.php"/>
<Log order="90" VisibleName="Log File" url="/diag_logs_ipsec.php"/>
</IPsec>
<L2TP cssClass="fa fa-lock">
<L2TP cssClass="fa fa-unlock">
<Settings order="10" url="/vpn_l2tp.php"/>
<Users order="20" url="/vpn_l2tp_users.php">
<Users order="20" url="/vpn_l2tp_users.php">
<Edit url="/vpn_l2tp_users_edit.php*"/>
</Users>
<LogFile order="30" VisibleName="Log File" url="/diag_logs_l2tp.php">
<Type url="/diag_logs_l2tp.php*"/>
</LogFile>
</L2TP>
<OpenVPN cssClass="fa fa-lock">
<Server order="10" VisibleName="Server Settings" url="/vpn_openvpn_server.php">
......@@ -356,6 +353,15 @@
<Status order="60" VisibleName="Connection Status" url="/status_openvpn.php"/>
<Log order="70" VisibleName="Log File" url="/diag_logs_openvpn.php"/>
</OpenVPN>
<PPTP cssClass="fa fa-unlock">
<Settings order="10" url="/vpn_pptp.php"/>
<Users order="20" url="/vpn_pptp_users.php">
<Edit url="/vpn_pptp_users_edit.php*"/>
</Users>
<LogFile order="30" VisibleName="Log File" url="/diag_logs_pptp.php">
<Type url="/diag_logs_pptp.php*"/>
</LogFile>
</PPTP>
</VPN>
<Help order="6" cssClass="glyphicon glyphicon-question-sign">
<AboutThisPage VisibleName="About this Page" url="/help.php" IsExternal="Y"/>
......
<?php
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2004-2009 Scott Ullrich
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
$logfile = '/var/log/system.log';
$logclog = true;
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.
*/
require_once("guiconfig.inc");
require_once("system.inc");
require_once("interfaces.inc");
$system_logfile = '/var/log/system.log';
$filtertext = '';
$nentries = 50;
if (isset($config['syslog']['nentries'])) {
$nentries = $config['syslog']['nentries'];
}
if (isset($_POST['clear'])) {
clear_clog($system_logfile);
}
if (isset($_POST['filtertext'])) {
$filtertext = htmlspecialchars($_POST['filtertext']);
}
include("head.inc");
?>
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr><td colspan="2">
<form id="clearform" name="clearform" action="diag_logs.php" method="post" class="__mt">
<input id="filtertext" name="filtertext" value="<?=$filtertext;?>" />
<input id="filtersubmit" name="filtersubmit" type="submit" class="btn btn-primary" value="<?=gettext("Filter");?>" />
</form>
</td></tr>
<?php dump_clog($system_logfile, $nentries, $filtertext); ?>
<tr><td colspan="2">
<form action="diag_logs.php" method="post">
<input name="clear" type="submit" class="btn btn-default" value="<?= gettext("Clear log");?>" />
</form>
</td></tr>
</table>
</div>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
require_once 'diag_logs_template.inc';
<?php
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
$logfile = '/var/log/portalauth.log';
$logclog = true;
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.
*/
require_once("guiconfig.inc");
require_once("services.inc");
require_once("system.inc");
require_once("interfaces.inc");
$portal_logfile = '/var/log/portalauth.log';
$nentries = 50;
if (isset($config['syslog']['nentries'])) {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
clear_clog($portal_logfile);
}
include("head.inc");
?>
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr><td colspan="2"><strong><?= sprintf(gettext('Last %s Portal Auth log entries'), $nentries); ?></strong></td></tr>
<?php dump_clog($portal_logfile, $nentries); ?>
<tr><td colspan="2">
<form action="diag_logs_auth.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</td></tr>
</table>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
require_once 'diag_logs_template.inc';
<?php
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2004-2009 Scott Ullrich
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
$logfile = '/var/log/dhcpd.log';
$logclog = true;
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.
*/
require_once("guiconfig.inc");
require_once("services.inc");
require_once("system.inc");
require_once("interfaces.inc");
$dhcpd_logfile = '/var/log/dhcpd.log';
$filtertext = '';
$nentries = 50;
if (isset($config['syslog']['nentries'])) {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
clear_clog($dhcpd_logfile);
killbyname("dhcpd");
function clear_hook()
{
killbyname('dhcpd');
services_dhcpd_configure();
}
if (isset($_POST['filtertext'])) {
$filtertext = htmlspecialchars($_POST['filtertext']);
}
$shortcut_section = "dhcp";
include("head.inc");
?>
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr><td colspan="2">
<form id="clearform" name="clearform" action="diag_logs_dhcp.php" method="post" class="__mt">
<input id="filtertext" name="filtertext" value="<?=$filtertext;?>" />
<input id="filtersubmit" name="filtersubmit" type="submit" class="btn btn-primary" value="<?=gettext("Filter");?>" />
</form>
</td></tr>
<?php dump_clog($dhcpd_logfile, $nentries, $filtertext); ?>
<tr><td colspan="2">
<form action="diag_logs_dhcp.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</td><tr>
<tr><td colspan="2"><?=gettext('NOTE: Clearing the log file will restart the DHCP daemon.') ?></td></tr>
</table>
</div>
</div>
</section>
</div>
</div>
</section>
require_once 'services.inc';
$shortcut_section = 'dhcp';
<?php include("foot.inc"); ?>
require_once 'diag_logs_template.inc';
<?php
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2004-2009 Scott Ullrich
Copyright (C) 2012 Seth Mos
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
$logfile = '/var/log/gateways.log';
$logclog = true;
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.
*/
require_once("guiconfig.inc");
require_once("services.inc");
require_once("system.inc");
require_once("interfaces.inc");
$system_logfile = '/var/log/gateways.log';
$filtertext = '';
$nentries = 50;
if (isset($config['syslog']['nentries'])) {
$nentries = $config['syslog']['nentries'];
}
if (!empty($_POST['clear'])) {
clear_clog($system_logfile);
}
if (isset($_POST['filtertext'])) {
$filtertext = htmlspecialchars($_POST['filtertext']);
}
include("head.inc");
?>
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped">
<tr>
<td colspan="2">
<form id="clearform" name="clearform" action="diag_logs_gateways.php" method="post" class="__mt">
<input id="filtertext" name="filtertext" value="<?=$filtertext;?>"/>
<input id="filtersubmit" name="filtersubmit" type="submit" class="btn btn-primary" value="<?=gettext("Filter");?>" />
</form>
</td>
</tr>
<?php dump_clog($system_logfile, $nentries, $filtertext); ?>
<tr>
<td colspan="2">
<form action="diag_logs_gateways.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</td>
</tr>
</table>
</div>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
require_once 'diag_logs_template.inc';
<?php
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2004-2009 Scott Ullrich
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
$logfile = '/var/log/ipsec.log';
$logclog = true;
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.
*/
require_once("guiconfig.inc");
require_once("vpn.inc");
require_once("services.inc");
require_once("system.inc");
require_once("interfaces.inc");
$ipsec_logfile = '/var/log/ipsec.log';
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
clear_clog($ipsec_logfile);
}
$shortcut_section = 'ipsec';
include("head.inc");
?>
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr><td colspan="2"><strong><?= sprintf(gettext("Last %s IPsec log entries"),$nentries);?></strong></td></tr>
<?php dump_clog($ipsec_logfile, $nentries); ?>
<tr><td colspan="2">
<form action="diag_logs_ipsec.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</td></tr>
</table>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
require_once 'diag_logs_template.inc';
<?php
if (htmlspecialchars($_POST['mode']))
$mode = htmlspecialchars($_POST['mode']);
elseif (htmlspecialchars($_GET['mode']))
$mode = htmlspecialchars($_GET['mode']);
else
$mode = "login";
if ($mode != 'raw') {
$logfile = '/var/log/vpn.log';
} else {
$logfile = '/var/log/l2tps.log';
}
$logtype = 'l2tp';
$tab_array = array();
$tab_array[] = array(gettext("L2TP Logins"), $mode != "raw", "/diag_logs_l2tp.php");
$tab_array[] = array(gettext("L2TP Raw"), $mode == "raw", "/diag_logs_l2tp.php?mode=raw");
require_once 'diag_logs_vpn.inc';
<?php
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2005 Bill Marquette <bill.marquette@gmail.com>.
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
$logfile = '/var/log/ntpd.log';
$logclog = true;
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
require_once 'services.inc';
$shortcut_section = 'ntp';
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.
*/
require_once("guiconfig.inc");
require_once("services.inc");
require_once("system.inc");
require_once("interfaces.inc");
$ntpd_logfile = '/var/log/ntpd.log';
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
clear_clog($ntpd_logfile);
}
$shortcut_section = "ntp";
include("head.inc");
?>
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr><td colspan="2"><strong><?= sprintf(gettext("Last %s NTP log entries"), $nentries);?></strong></td></tr>
<?php dump_clog($ntpd_logfile, $nentries); ?>
<tr><td colspan="2">
<form action="diag_logs_ntpd.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
<tr></td>
</table>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
require_once 'diag_logs_template.inc';
<?php
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2004-2009 Scott Ullrich
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
$logfile = '/var/log/openvpn.log';
$logclog = true;
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.
*/
require_once("guiconfig.inc");
require_once("vpn.inc");
require_once("services.inc");
require_once("system.inc");
require_once("interfaces.inc");
$openvpn_logfile = '/var/log/openvpn.log';
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
clear_clog($openvpn_logfile);
}
include("head.inc");
?>
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr><td colspan="2"><strong><?= sprintf(gettext("Last %s OpenVPN log entries"),$nentries)?></strong></td></tr>
<?php dump_clog($openvpn_logfile, $nentries); ?>
<tr><td colspan="2">
<form action="diag_logs_openvpn.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</td></tr>
</table>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
require_once 'diag_logs_template.inc';
<?php
/*
Copyright (C) 2014 Deciso B.V.
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.
*/
$tab_group = isset($tab_group) ? $tab_group : 'system';
$tab_array = array();
if ($tab_group == 'vpn') {
$tab_array[] = array(gettext("PPTP Logins"), (($vpntype == "pptp") && ($mode != "raw")), "/diag_logs_vpn.php?vpntype=pptp");
$tab_array[] = array(gettext("PPTP Raw"), (($vpntype == "pptp") && ($mode == "raw")), "/diag_logs_vpn.php?vpntype=pptp&amp;mode=raw");
$tab_array[] = array(gettext("PPPoE Logins"), (($vpntype == "poes") && ($mode != "raw")), "/diag_logs_vpn.php?vpntype=poes");
$tab_array[] = array(gettext("PPPoE Raw"), (($vpntype == "poes") && ($mode == "raw")), "/diag_logs_vpn.php?vpntype=poes&amp;mode=raw");
$tab_array[] = array(gettext("L2TP Logins"), (($vpntype == "l2tp") && ($mode != "raw")), "/diag_logs_vpn.php?vpntype=l2tp");
$tab_array[] = array(gettext("L2TP Raw"), (($vpntype == "l2tp") && ($mode == "raw")), "/diag_logs_vpn.php?vpntype=l2tp&amp;mode=raw");
} else {
$tab_array[] = array(gettext('Cache'), true, '/diag_logs_proxy.php?type=cache');
$tab_array[] = array(gettext('Access'), false, '/diag_logs_proxy.php?type=access');
$tab_array[] = array(gettext('Store'), false, '/diag_logs_proxy.php?type=store');
}
?><ul class="nav nav-pills" role="tablist">
<?php foreach ($tab_array as $tab): ?>
<li role="presentation" <?php if (str_replace('amp;','', $tab[2]) == $_SERVER['REQUEST_URI']):?>class="active"<?php endif; ?>><a href="<?=$tab[2];?>"><?=$tab[0];?></a></li>
<?php endforeach; ?>
</ul>
<?php
if (htmlspecialchars($_POST['mode']))
$mode = htmlspecialchars($_POST['mode']);
elseif (htmlspecialchars($_GET['mode']))
$mode = htmlspecialchars($_GET['mode']);
else
$mode = "login";
if ($mode != 'raw') {
$logfile = '/var/log/vpn.log';
} else {
$logfile = '/var/log/poes.log';
}
$logtype = 'poes';
$tab_array = array();
$tab_array[] = array(gettext("PPPoE Logins"), $mode != "raw", "/diag_logs_poes.php");
$tab_array[] = array(gettext("PPPoE Raw"), $mode == "raw", "/diag_logs_poes.php?mode=raw");
require_once 'diag_logs_vpn.inc';
<?php
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2004-2009 Scott Ullrich
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
$logfile = '/var/log/ppps.log';
$logclog = true;
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.
*/
require_once("guiconfig.inc");
require_once("system.inc");
require_once("interfaces.inc");
$ppps_logfile = '/var/log/ppps.log';
$filtertext = '';
$nentries = 50;
if (isset($config['syslog']['nentries'])) {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
clear_clog($ppps_logfile);
}
if (isset($_POST['filtertext'])) {
$filtertext = htmlspecialchars($_POST['filtertext']);
}
include("head.inc");
?>
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr><td colspan="2">
<form id="clearform" name="clearform" action="diag_logs_ppp.php" method="post" class="__mt">
<input id="filtertext" name="filtertext" value="<?=$filtertext;?>" />
<input id="filtersubmit" name="filtersubmit" type="submit" class="btn btn-primary" value="<?=gettext("Filter");?>" />
</form>
</td></tr>
<?php dump_clog($ppps_logfile, $nentries, $filtertext); ?>
<tr><td colspan="2">
<form action="diag_logs_ppp.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</td></tr>
</table>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
require_once 'diag_logs_template.inc';
<?php
if (htmlspecialchars($_POST['mode']))
$mode = htmlspecialchars($_POST['mode']);
elseif (htmlspecialchars($_GET['mode']))
$mode = htmlspecialchars($_GET['mode']);
else
$mode = "login";
if ($mode != 'raw') {
$logfile = '/var/log/vpn.log';
} else {
$logfile = '/var/log/pptps.log';
}
$logtype = 'pptp';
$tab_array = array();
$tab_array[] = array(gettext("PPTP Logins"), $mode != "raw", "/diag_logs_pptp.php");
$tab_array[] = array(gettext("PPTP Raw"), $mode == "raw", "/diag_logs_pptp.php?mode=raw");
require_once 'diag_logs_vpn.inc';
<?php
/*
Copyright (C) 2015 Deciso B.V.
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.
*/
require_once("guiconfig.inc");
require_once("system.inc");
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
$type = 'cache';
if (isset($_GET['type']) && ($_GET['type'] === 'access' || $_GET['type'] === 'store')) {
$type = $_GET['type'];
}
$logfile = "/var/log/squid/{$type}.log";
$logclog = false;
if (isset($_GET['clear'])) {
clear_log($logfile);
}
include("head.inc");
?>
$logpills = array();
$logpills[] = array(gettext('Cache'), true, '/diag_logs_proxy.php?type=cache');
$logpills[] = array(gettext('Access'), false, '/diag_logs_proxy.php?type=access');
$logpills[] = array(gettext('Store'), false, '/diag_logs_proxy.php?type=store');
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr><td colspan="2"><?php $tab_group = 'proxy'; include('diag_logs_pills.inc'); ?></td></tr>
<tr><td colspan="2"><strong><?= sprintf(gettext("Last %s Proxy log entries"), $nentries);?></strong></td></tr>
<?php dump_log($logfile, $nentries); ?>
<tr><td colspan="2">
<form method="get">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
<input name="type" type="hidden" value="<?= $type ?>" />
</form>
</td></tr>
</table>
</div>
</div>
</section>
</div>
</div>
</section>
require_once 'services.inc';
$shortcut_section = 'squid';
<?php include("foot.inc"); ?>
require_once 'diag_logs_template.inc';
<?php
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2008 Bill Marquette <bill.marquette@gmail.com>.
Copyright (C) 2008 Seth Mos <seth.mos@dds.nl>.
All rights reserved.
$logfile = '/var/log/relayd.log';
$logclog = true;
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.
*/
require_once("guiconfig.inc");
require_once("services.inc");
require_once("system.inc");
require_once("interfaces.inc");
$relayd_logfile = '/var/log/relayd.log';
if (empty($config['syslog']['nentries'])) {
$nentries = 50;
} else {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
clear_clog($relayd_logfile);
}
$shortcut_section = 'relayd';
include("head.inc");
?>
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr><td colspan="2"><strong><?= sprintf(gettext('Last %s Load Balancer log entries'), $nentries);?></strong></td></tr>
<?php dump_clog($relayd_logfile, $nentries); ?>
<tr><td colspan="2">
<form action="diag_logs_relayd.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</td></tr>
</table>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
require_once 'diag_logs_template.inc';
<?php
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2004-2009 Scott Ullrich
Copyright (C) 2012 Seth Mos
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
$logfile = '/var/log/resolver.log';
$logclog = true;
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.
*/
require_once("guiconfig.inc");
require_once("services.inc");
require_once("system.inc");
require_once("interfaces.inc");
$system_logfile = '/var/log/resolver.log';
$filtertext = '';
$nentries = 50;
if (isset($config['syslog']['nentries'])) {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
clear_clog($system_logfile);
}
if (isset($_POST['filtertext'])) {
$filtertext = htmlspecialchars($_POST['filtertext']);
}
include("head.inc");
?>
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr><td colspan="2">
<form id="clearform" name="clearform" action="diag_logs_resolver.php" method="post" class="__mt">
<input id="filtertext" name="filtertext" value="<?=$filtertext;?>" />
<input id="filtersubmit" name="filtersubmit" type="submit" class="btn btn-primary" value="<?=gettext("Filter");?>" />
</form>
</td></tr>
<?php dump_clog($system_logfile, $nentries, $filtertext); ?>
<tr><td colspan="2">
<form action="diag_logs_resolver.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</td></tr>
</table>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
require_once 'diag_logs_template.inc';
<?php
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2012 Jim Pingle <jimp@pfsense.org>.
All rights reserved.
$logfile = '/var/log/routing.log';
$logclog = true;
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.
*/
require_once("guiconfig.inc");
require_once("system.inc");
require_once("interfaces.inc");
$routing_logfile = '/var/log/routing.log';
$filtertext = '';
$nentries = 50;
if (isset($config['syslog']['nentries'])) {
$nentries = $config['syslog']['nentries'];
}
if (!empty($_POST['clear'])) {
clear_clog($routing_logfile);
}
if (isset($_POST['filtertext'])) {
$filtertext = htmlspecialchars($_POST['filtertext']);
}
include("head.inc");
?>
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr>
<td colspan="2">
<form id="clearform" name="clearform" action="diag_logs_routing.php" method="post" class="__mt">
<input id="filtertext" name="filtertext" value="<?=$filtertext;?>"/>
<input id="filtersubmit" name="filtersubmit" type="submit" class="btn btn-primary" value="<?=gettext("Filter");?>" />
</form>
</td>
</tr>
<?php dump_clog($routing_logfile, $nentries, $filtertext); ?>
<tr>
<td colspan="2">
<form action="diag_logs_routing.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</td>
</tr>
</table>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
require_once 'diag_logs_template.inc';
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2012 Seth Mos
Copyright (C) 2004-2009 Scott Ullrich
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.
*/
require_once("guiconfig.inc");
require_once("system.inc");
require_once("interfaces.inc");
/* expects $logfile to point to the system path */
/* expects $logclog to be true or false */
$filtertext = '';
$nentries = 50;
if (isset($config['syslog']['nentries'])) {
$nentries = $config['syslog']['nentries'];
}
if (!empty($_POST['clear'])) {
if ($logclog) {
clear_clog($logfile);
} else {
clear_log($logfile);
}
if (function_exists(clear_hook)) {
clear_hook();
}
}
if (isset($_POST['filtertext'])) {
$filtertext = htmlspecialchars($_POST['filtertext']);
}
include("head.inc");
?>
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<?php if (isset($logpills)): ?>
<tr>
<td colspan="2">
<ul class="nav nav-pills" role="tablist">
<?php foreach ($logpills as $pill): ?>
<li role="presentation" <?php if (str_replace('amp;','', $pill[2]) == $_SERVER['REQUEST_URI']):?>class="active"<?php endif; ?>><a href="<?=$pill[2];?>"><?=$pill[0];?></a></li>
<?php endforeach; ?>
</ul>
</td>
</tr>
<?php endif; ?>
<tr>
<td colspan="2">
<form id="clearform" name="clearform" action="<? $_SERVER['REQUEST_URI'] ?>" method="post">
<input id="filtertext" name="filtertext" value="<?=$filtertext;?>"/>
<input id="filtersubmit" name="filtersubmit" type="submit" class="btn btn-primary" value="<?=gettext("Filter");?>" />
</form>
</td>
</tr>
<?php
if ($logclog) {
dump_clog($logfile, $nentries, $filtertext);
} else {
dump_log($logfile, $nentries, $filtertext);
}
?>
<tr>
<td colspan="2">
<form action="<? $_SERVER['REQUEST_URI'] ?>" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</td>
</tr>
</table>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
......@@ -2,7 +2,7 @@
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -38,42 +38,13 @@ if (empty($config['syslog']['nentries'])) {
$nentries = $config['syslog']['nentries'];
}
if (htmlspecialchars($_POST['vpntype']))
$vpntype = htmlspecialchars($_POST['vpntype']);
elseif (htmlspecialchars($_GET['vpntype']))
$vpntype = htmlspecialchars($_GET['vpntype']);
else
$vpntype = "pptp";
if (htmlspecialchars($_POST['mode']))
$mode = htmlspecialchars($_POST['mode']);
elseif (htmlspecialchars($_GET['mode']))
$mode = htmlspecialchars($_GET['mode']);
else
$mode = "login";
switch ($vpntype) {
case 'pptp':
$logname = "pptps";
break;
case 'poes':
$logname = "poes";
break;
case 'l2tp':
$logname = "l2tps";
break;
}
if ($_POST['clear']) {
if ($mode != "raw") {
clear_clog("/var/log/vpn.log");
} else {
clear_clog("/var/log/{$logname}.log");
}
clear_clog($logfile);
}
function dump_clog_vpn($logfile, $tail) {
global $g, $config, $vpntype;
function dump_clog_vpn($logfile, $tail, $logtype)
{
global $config;
$sor = isset($config['syslog']['reverse']) ? "-r" : "";
......@@ -85,8 +56,9 @@ function dump_clog_vpn($logfile, $tail) {
$logent = preg_split("/\s+/", $logent, 6);
$llent = explode(",", $logent[5]);
$iftype = substr($llent[1], 0, 4);
if ($iftype != $vpntype)
if ($iftype != $logtype) {
continue;
}
echo "<tr>\n";
echo "<td class=\"listlr nowrap\">" . htmlspecialchars(join(" ", array_slice($logent, 0, 3))) . "</td>\n";
......@@ -123,7 +95,13 @@ include("head.inc");
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr><td colspan="4"><?php $tab_group = 'vpn'; include('diag_logs_pills.inc'); ?></td></tr>
<tr><td colspan="4">
<ul class="nav nav-pills" role="tablist">
<?php foreach ($tab_array as $tab): ?>
<li role="presentation" <?php if (str_replace('amp;','', $tab[2]) == $_SERVER['REQUEST_URI']):?>class="active"<?php endif; ?>><a href="<?=$tab[2];?>"><?=$tab[0];?></a></li>
<?php endforeach; ?>
</ul>
</td></tr>
<?php if ($mode != "raw"): ?>
<tr>
<td class="listhdrr"><?=gettext("Time");?></td>
......@@ -131,13 +109,12 @@ include("head.inc");
<td class="listhdrr"><?=gettext("User");?></td>
<td class="listhdrr"><?=gettext("IP address");?></td>
</tr>
<?php dump_clog_vpn("/var/log/vpn.log", $nentries); ?>
<?php dump_clog_vpn($logfile, $nentries, $logname); ?>
<?php else:
dump_clog("/var/log/{$logname}.log", $nentries);
dump_clog($logfile, $nentries);
endif; ?>
<tr><td colspan="4">
<form action="diag_logs_vpn.php" method="post">
<input type="hidden" name="vpntype" id="vpntype" value="<?=$vpntype;?>" />
<form action="<? $_SERVER['REQUEST_URI'] ?>" method="post">
<input type="hidden" name="mode" id="mode" value="<?=$mode;?>" />
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
......
<?php
/*
Copyright (C) Deciso B.V.
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>.
All rights reserved.
$logfile = '/var/log/wireless.log';
$logclog = true;
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.
*/
require_once("guiconfig.inc");
require_once("system.inc");
require_once("interfaces.inc");
$wireless_logfile = '/var/log/wireless.log';
$filtertext = '';
$nentries = 50;
if (isset($config['syslog']['nentries'])) {
$nentries = $config['syslog']['nentries'];
}
if ($_POST['clear']) {
clear_clog($wireless_logfile);
}
if (isset($_POST['filtertext'])) {
$filtertext = htmlspecialchars($_POST['filtertext']);
}
include("head.inc");
?>
<body>
<?php include("fbegin.inc"); ?>
<section class="page-content-main">
<div class="container-fluid">
<div class="row">
<?php if (isset($input_errors) && count($input_errors) > 0) print_input_errors($input_errors); ?>
<section class="col-xs-12">
<div class="tab-content content-box col-xs-12">
<div class="table-responsive">
<table class="table table-striped table-sort">
<tr><td colspan="2">
<form id="clearform" name="clearform" action="diag_logs_wireless.php" method="post" class="__mt">
<input id="filtertext" name="filtertext" value="<?=$filtertext;?>"/>
<input id="filtersubmit" name="filtersubmit" type="submit" class="btn btn-primary" value="<?=gettext("Filter");?>" />
</form>
</td></tr>
<?php dump_clog($wireless_logfile, $nentries, $filtertext); ?>
<tr><td colspan="2">
<form action="diag_logs_wireless.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form>
</td></tr>
</table>
</div>
</div>
</section>
</div>
</div>
</section>
<?php include("foot.inc"); ?>
require_once 'diag_logs_template.inc';
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment