summaryrefslogtreecommitdiffstats
path: root/usr/local/www/diag_logs_vpn.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-07-24 18:59:18 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-07-24 18:59:18 +0000
commita9e4aee783c4b1b3b108788a50b961917504120f (patch)
tree8526df677bdb6b47febb75ec01a79ef05d7e3430 /usr/local/www/diag_logs_vpn.php
parent1d1630ece6be068c4dda27c334448daf142a822b (diff)
downloadpfsense-a9e4aee783c4b1b3b108788a50b961917504120f.zip
pfsense-a9e4aee783c4b1b3b108788a50b961917504120f.tar.gz
Only show mpd events
Fixes Ticket #238
Diffstat (limited to 'usr/local/www/diag_logs_vpn.php')
-rwxr-xr-xusr/local/www/diag_logs_vpn.php42
1 files changed, 11 insertions, 31 deletions
diff --git a/usr/local/www/diag_logs_vpn.php b/usr/local/www/diag_logs_vpn.php
index b127f17..f85e8d1 100755
--- a/usr/local/www/diag_logs_vpn.php
+++ b/usr/local/www/diag_logs_vpn.php
@@ -41,32 +41,7 @@ if (!$nentries)
$nentries = 50;
if ($_POST['clear']) {
- exec("/usr/sbin/clog -i -s 262144 {$ipsec_logfile}");
-}
-
-function dump_clog_vpn($logfile, $tail) {
- global $config;
-
- $sor = isset($config['syslog']['reverse']) ? "-r" : "";
-
- exec("/usr/sbin/clog {$logfile} | tail {$sor} -n {$tail}", $logarr);
-
- foreach ($logarr as $logent) {
- $logent = preg_split("/\s+/", $logent, 6);
- $llent = explode(",", $logent[5]);
-
- echo "<tr>\n";
- echo "<td class=\"listlr\" nowrap>" . htmlspecialchars(join(" ", array_slice($logent, 0, 3))) . "</td>\n";
-
- if ($llent[0] == "login")
- echo "<td class=\"listr\"><img src=\"/themes/".$g['theme']."/images/icons/icon_in.gif\" width=\"11\" height=\"11\" title=\"login\"></td>\n";
- else
- echo "<td class=\"listr\"><img src=\"/themes/".$g['theme']."/images/icons/icon_out.gif\" width=\"11\" height=\"11\" title=\"logout\"></td>\n";
-
- echo "<td class=\"listr\">" . htmlspecialchars($llent[3]) . "</td>\n";
- echo "<td class=\"listr\">" . htmlspecialchars($llent[2]) . "&nbsp;</td>\n";
- echo "</tr>\n";
- }
+ exec("/usr/sbin/clog -i -s 262144 /var/log/vpn.log");
}
$pgtitle = "Diagnostics: System logs: PPTP VPN";
@@ -104,11 +79,16 @@ include("head.inc");
<td class="listhdrr">User</td>
<td class="listhdrr">IP address</td>
</tr>
- <tr><td><?php dump_clog_vpn($pptp_logfile, $nentries); ?>
- <br><form action="diag_logs_vpn.php" method="post">
-<input name="clear" type="submit" class="formbtn" value="Clear log">
-</form></td></tr>
- </table>
+ <?php dump_clog($ipsec_logfile, $nentries, true, array("mpd")); ?>
+ <tr>
+ <td>
+ <br>
+ <form action="diag_logs.php" method="post">
+ <input name="clear" type="submit" class="formbtn" value="Clear log">
+ </form>
+ </td>
+ </tr>
+ </table>
</div>
</td>
</tr>
OpenPOWER on IntegriCloud