[O&M Master] When Fail2ban & Roundcube doesn't working properly in Ubuntu
|
Problem: When trying to ban brute force login attempts at roundcube webpage. It's possible to successfully ban imap brute force attempts at dovecot. But for roundcube it won't work. Let's say an user 'testuser' wants to login at my roundcube front end using brute force. His public IP is 80.111.100.1 and my server public IP is 70.111.100.1 (Sorry if this aren't good example IPs) Roundcube logs fail attempts like this: [19-Aug-2016 15:01:05 +0200]: <ea7sisp2> IMAP Error: Login failed for testuser from 127.0.0.1. AUTHENTICATE PLAIN: Authentication failed. in /var/www/html/rc/program/lib/Roundcube/rcube_imap.php on line 193 (POST /rc/?_task=login&_action=login) Dovecot loggs it this way: 2016-08-19 15:01 imap-login: Info: Disconnected (auth failed, 1 attempts in 2 secs): user=<testuser>, method=PLAIN, rip=70.111.100.1, lip=192.168.1.143, TLS, session=<7+xfSmt62gBQgCQz> Normally, all auth failed attemps in this log file with fail2ban. But because roundcube somehow writes own IP in rip, block main server and not testuser's puplic IP. Solution: We can resolve this issue by fail2ban's whitelisting function: Whitelisting is setup in the jail.conf file using a space separated list. [DEFAULT] # This will ignore connection coming from common private networks. |
|
Whats is this round cube is actually? I'm a newbie of Linux platform. Would you like to discuss bit more? |

Favorite (0)