added ip address to $f2b_options['perm_bans'] and $f2b_options['active_bans'] to fail2ban.inc (#4152)

added link to bgp.he.net/ip/ in admin fail2ban overview
This commit is contained in:
prey87
2021-06-28 07:07:29 +02:00
committed by GitHub
parent a78eb5cefe
commit f767a27859
2 changed files with 8 additions and 3 deletions

View File

@@ -46,7 +46,11 @@ function fail2ban($_action, $_data = null) {
$pb = $redis->hGetAll('F2B_PERM_BANS');
if (is_array($pb)) {
foreach ($pb as $key => $value) {
$f2b_options['perm_bans'][] = $key;
$f2b_options['perm_bans'][] = array(
'network'=>$key,
'ip' => strtok($key,'/')
);
}
}
else {
@@ -61,6 +65,7 @@ function fail2ban($_action, $_data = null) {
$f2b_options['active_bans'][] = array(
'queued_for_unban' => $queued_for_unban,
'network' => $network,
'ip' => strtok($network,'/'),
'banned_until' => sprintf('%02dh %02dm %02ds', ($difference/3600), ($difference/60%60), $difference%60)
);
}