Add hostnames for blacklist.

This commit is contained in:
Kraeutergarten
2019-05-20 09:02:40 +02:00
parent e6de9c299d
commit b862ce2bfb
2 changed files with 87 additions and 37 deletions

View File

@@ -203,7 +203,7 @@ function fail2ban($_action, $_data = null) {
$bl_array = array_map('trim', preg_split( "/( |,|;|\n)/", $bl));
if (is_array($bl_array)) {
foreach ($bl_array as $bl_item) {
if (valid_network($bl_item)) {
if (valid_network($bl_item) || valid_hostname($bl_item)) {
$redis->hSet('F2B_BLACKLIST', $bl_item, 1);
}
}