2021年1月12日 星期二

roundcube webmail Brute Forcing Attack 防禦

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

1. 下載 roundcube-fail2ban-plugin,解壓縮放在roundcube的plugin目錄裏,
    並把目錄名稱改成fail2ban。

2. 在roundcube的設定檔config.inc.php裏掛載fail2ban plugin
$rcmail_config['plugins'] = array('fail2ban');


3. 在 /etc/fail2ban/jail.conf 加上
[roundcube]
enabled  = true
port     = http,https
filter   = roundcube
action   = iptables-multiport[name=roundcube, port="http,https"]
logpath  = /var/log/roundcubemail/userlogins

4. 新增 /etc/fail2ban/filter.d/roundcube.conf 
[Definition]
failregex = FAILED login for .*. from <HOST>
ignoreregex =

也可以不使用這個plugin去產生userlogins這個LOG檔,
直接修改fail2ban的設定去抓roundcube的log檔,
另外也要修改filter截取字串的內容。

沒有留言:

Aruba 5520 設定備份

先打開 TFTP Server 接著連線到設備,不用進入 System View 備份前先儲存設定,以免遺漏 <core-switch> save force 開始備份 <core-switch> backup startup-configuration ...