diff --git a/conf/fail2ban/jail.local b/conf/fail2ban/jail.local index 786f2fd9..e7ab33ba 100644 --- a/conf/fail2ban/jail.local +++ b/conf/fail2ban/jail.local @@ -32,6 +32,14 @@ logpath = /var/log/syslog maxretry = 20 findtime = 30 +[roundcube] +enabled = true +port = http,https +filter = roundcube +logpath = /var/log/roundcubemail/errors +maxretry = 20 +findtime = 30 + [recidive] enabled = true maxretry = 10 diff --git a/conf/fail2ban/roundcube.conf b/conf/fail2ban/roundcube.conf new file mode 100644 index 00000000..7aa7c8bd --- /dev/null +++ b/conf/fail2ban/roundcube.conf @@ -0,0 +1,14 @@ +# Fail2Ban configuration file for roundcube web server +# +# +# + +[INCLUDES] + +before = common.conf + +[Definition] + +failregex = IMAP Error: Login failed for .*? from \. AUTHENTICATE.* + +ignoreregex = diff --git a/setup/system.sh b/setup/system.sh index cff423ce..cd633b62 100755 --- a/setup/system.sh +++ b/setup/system.sh @@ -233,5 +233,5 @@ cat conf/fail2ban/jail.local \ > /etc/fail2ban/jail.local cp conf/fail2ban/dovecotimap.conf /etc/fail2ban/filter.d/dovecotimap.conf cp conf/fail2ban/miab-management-daemon.conf /etc/fail2ban/filter.d/miab-management-daemon.conf - +cp conf/fail2ban/roundcube.conf /etc/fail2ban/filter.d/roundcube.conf restart_service fail2ban