1
|
#!/usr/local/bin/php
|
2
|
<?php
|
3
|
/* $Id$ */
|
4
|
/*
|
5
|
diag_logs_auth.php
|
6
|
part of m0n0wall (http://m0n0.ch/wall)
|
7
|
|
8
|
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
|
9
|
All rights reserved.
|
10
|
|
11
|
Redistribution and use in source and binary forms, with or without
|
12
|
modification, are permitted provided that the following conditions are met:
|
13
|
|
14
|
1. Redistributions of source code must retain the above copyright notice,
|
15
|
this list of conditions and the following disclaimer.
|
16
|
|
17
|
2. Redistributions in binary form must reproduce the above copyright
|
18
|
notice, this list of conditions and the following disclaimer in the
|
19
|
documentation and/or other materials provided with the distribution.
|
20
|
|
21
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
22
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
23
|
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
24
|
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
25
|
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
26
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
27
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
28
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
29
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
30
|
POSSIBILITY OF SUCH DAMAGE.
|
31
|
*/
|
32
|
|
33
|
require("guiconfig.inc");
|
34
|
|
35
|
$portal_logfile = "{$g['varlog_path']}/portalauth.log";
|
36
|
|
37
|
$nentries = $config['syslog']['nentries'];
|
38
|
if (!$nentries)
|
39
|
$nentries = 50;
|
40
|
|
41
|
if ($_POST['clear']) {
|
42
|
exec("/usr/sbin/clog -i -s 262144 {$portal_logfile}");
|
43
|
}
|
44
|
|
45
|
?>
|
46
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
47
|
<html>
|
48
|
<head>
|
49
|
<title><?=gentitle("Diagnostics: System logs: Portal Auth");?></title>
|
50
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
51
|
<link href="gui.css" rel="stylesheet" type="text/css">
|
52
|
</head>
|
53
|
|
54
|
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
|
55
|
<?php include("fbegin.inc"); ?>
|
56
|
<p class="pgtitle">Diagnostics: System logs: Portal Auth</p>
|
57
|
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
58
|
<tr><td>
|
59
|
<ul id="tabnav">
|
60
|
<li class="tabinact"><a href="diag_logs.php">System</a></li>
|
61
|
<li class="tabinact"><a href="diag_logs_filter.php">Firewall</a></li>
|
62
|
<li class="tabinact"><a href="diag_logs_dhcp.php">DHCP</a></li>
|
63
|
<li class="tabact">Portal Auth</li>
|
64
|
<li class="tabinact"><a href="diag_logs_ipsec.php">IPSEC VPN</a></li>
|
65
|
<li class="tabinact"><a href="diag_logs_vpn.php">PPTP VPN</a></li>
|
66
|
<li class="tabinact"><a href="diag_logs_settings.php">Settings</a></li>
|
67
|
</ul>
|
68
|
</td></tr>
|
69
|
<tr>
|
70
|
<td class="tabcont">
|
71
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
72
|
<tr>
|
73
|
<td colspan="2" class="listtopic">
|
74
|
Last <?=$nentries;?> Portal Auth log entries</td>
|
75
|
</tr>
|
76
|
<?php dump_clog($portal_logfile, $nentries); ?>
|
77
|
</table>
|
78
|
<br><form action="diag_logs_auth.php" method="post">
|
79
|
<input name="clear" type="submit" class="formbtn" value="Clear log">
|
80
|
</form>
|
81
|
</td>
|
82
|
</tr>
|
83
|
</table>
|
84
|
<?php include("fend.inc"); ?>
|
85
|
</body>
|
86
|
</html>
|