Fixed Fail2Ban for centos

This commit is contained in:
2020-12-09 21:35:01 +01:00
parent d6cebfefb2
commit 9e9211c475
10 changed files with 38 additions and 12 deletions

View File

@@ -6,4 +6,4 @@ filter = nextcloud
maxretry = 15
bantime = 900
findtime = 900
logpath = /var/log/nextcloud/SITEname
logpath = /var/www/DOMain/html/data/nextcloud.log

View File

@@ -0,0 +1,21 @@
module fail2ban-allowhttpd 1.1;
require {
type httpd_sys_rw_content_t;
type fail2ban_t;
type syslogd_var_run_t;
type fail2ban_client_t;
class capability dac_override;
class dir { read getattr search ioctl };
class file { getattr read open search ioctl };
}
#============= fail2ban_client_t ==============
allow fail2ban_client_t httpd_sys_rw_content_t:file getattr;
allow fail2ban_client_t self:capability dac_override;
#============= fail2ban_t ==============
allow fail2ban_t httpd_sys_rw_content_t:dir { read getattr search ioctl };
allow fail2ban_t httpd_sys_rw_content_t:file { read getattr open search ioctl };
allow fail2ban_t syslogd_var_run_t:dir read;
allow fail2ban_t syslogd_var_run_t:file { read getattr open };