Skip to content

Commit 87dd103

Browse files
author
xaver
committed
Fix #1746 - ipv6 added into monitor frontend
1 parent 6ad46ab commit 87dd103

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

server/lib/classes/monitor_tools.inc.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,23 @@ public function monitorIPTables() {
12041204
system('which iptables', $retval); // Debian, Ubuntu, Fedora
12051205
if ($retval === 0) {
12061206
/* Get the data of the log */
1207-
$data['output'] = shell_exec('iptables -S');
1207+
$data['output'] = '<h2>iptables -S (ipv4)</h2>'.shell_exec('iptables -S');
1208+
1209+
/*
1210+
* At this moment, there is no state (maybe later)
1211+
*/
1212+
$state = 'no_state';
1213+
} else {
1214+
$state = 'no_state';
1215+
$data = '';
1216+
}
1217+
1218+
1219+
/* This monitoring is only available if fail2ban is installed */
1220+
system('which ip6tables', $retval); // Debian, Ubuntu, Fedora
1221+
if ($retval === 0) {
1222+
/* Get the data of the log */
1223+
$data['output'] .= '<br><h2>ip6tables -S (ipv6)</h2>'.shell_exec('ip6tables -S');
12081224

12091225
/*
12101226
* At this moment, there is no state (maybe later)

0 commit comments

Comments
 (0)