예제 #1
0
function clear_all_log_files()
{
    killbyname('syslogd');
    $log_files = array("system", "filter", "dhcpd", "vpn", "pptps", "poes", "l2tps", "openvpn", "portalauth", "ipsec", "ppps", "relayd", "wireless", "lighttpd", "ntpd", "gateways", "resolver", "routing");
    foreach ($log_files as $lfile) {
        clear_log_file("/var/log/{$lfile}.log", false);
    }
    system_syslogd_start();
    killbyname("dhcpd");
    services_dhcpd_configure();
}
예제 #2
0
	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 'guiconfig.inc';
setlocale(LC_ALL, 'tr_TR.ISO8859-9');
$portal_logfile = "{$g['varlog_path']}/portalauth.log";
$nentries = $config['syslog']['nentries'];
if (!$nentries) {
    $nentries = 50;
}
if ($_GET['act'] == 'del') {
    clear_log_file($portal_logfile);
}
if ($_POST['filtertext']) {
    $filtertext = htmlspecialchars($_POST['filtertext']);
}
if ($filtertext) {
    $filtertextmeta = "?filtertext={$filtertext}";
}
$pgtitle = array('HOTSPOT ', 'OTURUM HAREKETLERÝ');
?>

<?php 
include 'headansi.inc';
?>
</head>
<body>
예제 #3
0
	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");
예제 #4
0
*/
##|+PRIV
##|*IDENT=page-hidden-nolongerincluded
##|*NAME=Hidden: No longer included page
##|*DESCR=Allow access to the 'Hidden: No longer included' page.
##|*MATCH=diag_logs_filter_dynamic.php*
##|-PRIV
require "guiconfig.inc";
require_once "filter_log.inc";
$filter_logfile = "{$g['varlog_path']}/filter.log";
/* Hardcode this. AJAX doesn't do so well with large numbers */
$nentries = 50;
/* AJAX related routines */
handle_ajax($nentries, $nentries + 20);
if ($_POST['clear']) {
    clear_log_file($filter_logfile);
}
$filterlog = conv_log_filter($filter_logfile, $nentries, $nentries + 100);
$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("Firewall (Dynamic View)"));
$shortcut_section = "firewall";
include "head.inc";
?>
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php 
include "fbegin.inc";
?>
<script type="text/javascript">
//<![CDATA[
	lastsawtime = '<?php 
echo time();
?>
예제 #5
0
	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';
$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>
<?php 
include "fbegin.inc";
?>

	<section class="page-content-main">
		<div class="container-fluid">
예제 #6
0
if (!$_GET['logfile']) {
    $logfile = 'system';
} else {
    $logfile = $_GET['logfile'];
    if (!array_key_exists($logfile, $allowed_logs)) {
        /* Do not let someone attempt to load an unauthorized log. */
        $logfile = 'system';
    }
}
$system_logfile = "{$g['varlog_path']}/" . basename($logfile) . ".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}";
}
/* Setup shortcuts if they exist */
if (!empty($allowed_logs[$logfile]["shortcut"])) {
    $shortcut_section = $allowed_logs[$logfile]["shortcut"];
}
$pgtitle = array(gettext("Status"), gettext("System logs"), gettext($allowed_logs[$logfile]["name"]));
예제 #7
0
	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();
예제 #8
0
	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");
예제 #9
0
*/
##|+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();
예제 #10
0
	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");
예제 #11
0
} else {
    $mode = "login";
}
switch ($vpntype) {
    case 'poes':
        $logname = "poes";
        break;
    case 'l2tp':
        $logname = "l2tps";
        break;
}
if ($_POST['clear']) {
    if ($mode != "raw") {
        clear_log_file("/var/log/vpn.log");
    } else {
        clear_log_file("/var/log/{$logname}.log");
    }
}
function dump_clog_vpn($logfile, $tail)
{
    global $g, $config, $vpntype;
    $sor = isset($config['syslog']['reverse']) ? "-r" : "";
    $logarr = "";
    if (isset($config['system']['usefifolog'])) {
        exec("/usr/sbin/fifolog_reader " . escapeshellarg($logfile) . " | tail {$sor} -n " . $tail, $logarr);
    } else {
        exec("/usr/local/sbin/clog " . escapeshellarg($logfile) . " | tail {$sor} -n " . $tail, $logarr);
    }
    $rows = 0;
    foreach ($logarr as $logent) {
        $logent = preg_split("/\\s+/", $logent, 6);
예제 #12
0
	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";
$routing_logfile = '/var/log/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>

<?php 
include "fbegin.inc";
?>

	<section class="page-content-main">
		<div class="container-fluid">
			<div class="row">
예제 #13
0
##|*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");