Project

General

Profile

Support #674

Adding Fail2ban Support To Roundcube

Added by Daniel Curtis almost 5 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Mail Server
Target version:
Start date:
10/09/2015
Due date:
% Done:

0%

Estimated time:
0.50 h

Description

This is a guide for installing the fail2ban plugin on roundcube on FreeBSD 9.

Install Fail2ban Plugin

  • Clone the repo:
    cd /usr/local/www/roundcube/plugins
    git clone git://github.com/mattrude/rc-plugin-fail2ban.git fail2ban
    
  • Edit the main roundcube config:
    vi /usr/local/www/roundcube/config/config.inc.php
    
    • And add fail2ban to the plugins array:
      $config['plugins'] = array(
          'archive',
          'zipdownload',
          'fail2ban',
      );
      

Configure fail2ban

  • Create the filter regex:
    vi /usr/local/etc/fail2ban/filter.d/roundcube.conf:
    
    • And add the following:
      [Definition]
      failregex = FAILED login for .*. from <HOST>
      ignoreregex =
      
  • Then create the jail config:
    vi /usr/local/etc/fail2ban/jail.d/roundcube.conf
    
    • And add the following:
      [roundcube]
      enabled  = true
      port     = http,https
      filter   = roundcube
      action   = ipfw
      logpath  = /usr/local/www/roundcube/logs/userlogins
      
  • Restart fail2ban to apply the new configs:
    service fail2ban restart
    

History

#1 Updated by Daniel Curtis over 3 years ago

  • Status changed from New to Closed

Also available in: Atom PDF