Archiv der Kategorie: RoundCube

Roundcube per Fail2Ban absichern

Von Matt Rude gibt es das passende Addon für Roundcube:

mattrude.com/projects/roundcube-fail2ban-plugin/

1. downloaden und im roundcube addon Verzeichnis entpacken

2. Ordner zu fail2ban umbenennen

3.

vi ../config/main.inc.php

anpassen mit

$rcmail_config['plugins'] = array( … etc. … 'fail2ban' … usw. …);

4.

vi /etc/fail2ban/jail.local
[roundcube]
 
enabled = true
port = http,https
filter = roundcube
logpath = /var/log/syslog
bantime  = 31536000
maxretry = 10

5.

vi /etc/fail2ban/filter.d/roundcube.conf
# Fail2Ban configuration file
#
# Author:
#   mattrude.com/projects/roundcube-fail2ban-plugin/
#   https://grinux.wordpress.com/2012/09/04/make-fail2ban-monitor-roundcube-authentication-access/
#
#               PLITC: Daniel.Plominski
#
# $Revision:
#
[INCLUDES]
#
# Read common prefixes. If any customizations available -- read them from
# common.local
before = common.conf
#
[Definition]
failregex = ^%(__prefix_line)sFAILED login for .* from <HOST>$
#
ignoreregex =
#
# EOF