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截取字串的內容。

沒有留言:

OUTLOOK 無法加密連線 POP3S SMTPS

最近郵件主機加上了憑證,公司一堆老舊電腦卻無法連線, 原先以為是主機設定的問題搞了很久, 最終還是要谷歌大師出馬, 參考這篇 文章 就解決了