Project

General

Profile

Download (3.56 KB) Statistics
| Branch: | Tag: | Revision:
1 e35011e0 Scott Ullrich
<?php
2
/* $Id$ */
3
/*
4
	diag_logs.php
5 13d193c2 Scott Ullrich
	Copyright (C) 2004-2009 Scott Ullrich
6 e35011e0 Scott Ullrich
	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 13d193c2 Scott Ullrich
/*	
35
	pfSense_MODULE:	openvpn
36
*/
37
38 6b07c15a Matthew Grooms
##|+PRIV
39
##|*IDENT=page-status-systemlogs-openvpn
40
##|*NAME=Status: System logs: OpenVPN page
41
##|*DESCR=Allow access to the 'Status: System logs: OpenVPN' page.
42
##|*MATCH=diag_logs_openvpn.php*
43
##|-PRIV
44
45 f8ec8de4 Renato Botelho
$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("OpenVPN"));
46 e35011e0 Scott Ullrich
47
require("guiconfig.inc");
48 483e6de8 Scott Ullrich
require_once("vpn.inc");
49 e35011e0 Scott Ullrich
50
$openvpn_logfile = "{$g['varlog_path']}/openvpn.log";
51
52
$nentries = $config['syslog']['nentries'];
53
if (!$nentries)
54
	$nentries = 50;
55
56 d6abaa18 Scott Ullrich
if ($_POST['clear']) 
57
	clear_log_file($openvpn_logfile);
58 e35011e0 Scott Ullrich
59
include("head.inc");
60
61
?>
62
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
63
<?php include("fbegin.inc"); ?>
64
<table width="100%" border="0" cellpadding="0" cellspacing="0">
65
 	<tr>
66
		<td>
67
<?php
68
	$tab_array = array();
69 f8ec8de4 Renato Botelho
	$tab_array[] = array(gettext("System"), false, "diag_logs.php");
70
	$tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
71
	$tab_array[] = array(gettext("DHCP"), false, "diag_logs_dhcp.php");
72
	$tab_array[] = array(gettext("Portal Auth"), false, "diag_logs_auth.php");
73
	$tab_array[] = array(gettext("IPsec"), false, "diag_logs_ipsec.php");
74
	$tab_array[] = array(gettext("PPP"), false, "diag_logs_ppp.php");
75
	$tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
76
	$tab_array[] = array(gettext("Load Balancer"), false, "diag_logs_relayd.php");
77
	$tab_array[] = array(gettext("OpenVPN"), true, "diag_logs_openvpn.php");
78
	$tab_array[] = array(gettext("OpenNTPD"), false, "diag_logs_ntpd.php");
79
	$tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
80 e35011e0 Scott Ullrich
	display_top_tabs($tab_array);
81
?>
82
  		</td>
83
	</tr>
84
	<tr>
85
    	<td>
86
			<div id="mainarea">
87
			<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
88
		  		<tr>
89 f8ec8de4 Renato Botelho
					<td colspan="2" class="listtopic"><?php printf(gettext("Last %s OpenVPN log entries"),$nentries)?></td>
90 e35011e0 Scott Ullrich
		  		</tr>
91 08b4068f Scott Ullrich
				<?php dump_clog($openvpn_logfile, $nentries); ?>
92 e35011e0 Scott Ullrich
				<tr>
93
					<td>
94
						<br>
95
						<form action="diag_logs_openvpn.php" method="post">
96
						<input name="clear" type="submit" class="formbtn" value="Clear log">
97
						</form>
98
					</td>
99
				</tr>
100
			</table>
101
			</div>
102
		</td>
103
	</tr>
104
</table>
105
<?php include("fend.inc"); ?>
106
</body>
107
</html>