Project

General

Profile

Download (3.22 KB) Statistics
| Branch: | Tag: | Revision:
1 32887d33 Scott Ullrich
<?php
2 b46bfcf5 Bill Marquette
/* $Id$ */
3 32887d33 Scott Ullrich
/*
4
	diag_logs.php
5
	Copyright (C) 2004 Scott Ullrich
6
	All rights reserved.
7
8
	originally part of m0n0wall (http://m0n0.ch/wall)
9
	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
10
	All rights reserved.
11
12
	Redistribution and use in source and binary forms, with or without
13
	modification, are permitted provided that the following conditions are met:
14
15
	1. Redistributions of source code must retain the above copyright notice,
16
	   this list of conditions and the following disclaimer.
17
18
	2. Redistributions in binary form must reproduce the above copyright
19
	   notice, this list of conditions and the following disclaimer in the
20
	   documentation and/or other materials provided with the distribution.
21
22
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
23
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
24
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
26
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31
	POSSIBILITY OF SUCH DAMAGE.
32
*/
33
34
require("guiconfig.inc");
35
36 bc7f52e2 Colin Smith
$ipsec_logfile = "{$g['varlog_path']}/ipsec.log";
37 963d5343 Bill Marquette
38 32887d33 Scott Ullrich
$nentries = $config['syslog']['nentries'];
39
if (!$nentries)
40
	$nentries = 50;
41
42
if ($_POST['clear']) {
43 929d48cb Scott Ullrich
	exec("killall syslogd");
44 963d5343 Bill Marquette
	exec("/usr/sbin/clog -i -s 262144 {$ipsec_logfile}");
45 929d48cb Scott Ullrich
	system_syslogd_start();	
46 32887d33 Scott Ullrich
}
47
48 b63695db Scott Ullrich
$pgtitle = "Diagnostics: System logs: IPSEC VPN";
49
include("head.inc");
50 32887d33 Scott Ullrich
51 b63695db Scott Ullrich
?>
52 32887d33 Scott Ullrich
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
53
<?php include("fbegin.inc"); ?>
54 310b2c06 Bill Marquette
<p class="pgtitle"><?=$pgtitle?></p>
55 32887d33 Scott Ullrich
<table width="100%" border="0" cellpadding="0" cellspacing="0">
56 0913a099 Erik Kristensen
 	<tr>
57
		<td>
58 b63695db Scott Ullrich
<?php
59
	$tab_array = array();
60 9972f533 Bill Marquette
	$tab_array[] = array("System", false, "diag_logs.php");
61
	$tab_array[] = array("Firewall", false, "diag_logs_filter.php");
62
	$tab_array[] = array("DHCP", false, "diag_logs_dhcp.php");
63
	$tab_array[] = array("Portal Auth", false, "diag_logs_auth.php");
64
	$tab_array[] = array("IPSEC VPN", true, "diag_logs_ipsec.php");
65
	$tab_array[] = array("PPTP VPN", false, "diag_logs_vpn.php");
66
	$tab_array[] = array("Load Balance", false, "diag_logs_slbd.php");
67 03491df0 Scott Ullrich
	$tab_array[] = array("OpenVPN", false, "diag_logs_openvpn.php");
68 9972f533 Bill Marquette
	$tab_array[] = array("Settings", false, "diag_logs_settings.php");
69 b63695db Scott Ullrich
	display_top_tabs($tab_array);
70
?>
71 0913a099 Erik Kristensen
  		</td>
72
	</tr>
73
	<tr>
74
    	<td>
75
			<div id="mainarea">
76
			<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
77
		  		<tr>
78
					<td colspan="2" class="listtopic">Last <?=$nentries;?> IPSEC log entries</td>
79
		  		</tr>
80 c8ee172b Colin Smith
				<?php dump_clog($ipsec_logfile, $nentries); ?>
81 0913a099 Erik Kristensen
				<tr>
82
					<td>
83
						<br>
84 1a2da578 Scott Ullrich
						<form action="diag_logs_ipsec.php" method="post">
85 0913a099 Erik Kristensen
						<input name="clear" type="submit" class="formbtn" value="Clear log">
86
						</form>
87
					</td>
88
				</tr>
89
			</table>
90
			</div>
91
		</td>
92
	</tr>
93 32887d33 Scott Ullrich
</table>
94
<?php include("fend.inc"); ?>
95 555d3758 Scott Ullrich
<meta http-equiv="refresh" content="60;url=<?php print $_SERVER['SCRIPT_NAME']; ?>">
96 32887d33 Scott Ullrich
</body>
97
</html>