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

沒有留言:

PowerShell 無法執行腳本

查看目前的執行原則 Get-ExecutionPolicy 預設原則為Restricted,也就是受到限制的意思,所以造成你無法執行Powershell的腳本。 PowerShell 執行原則共有七個: AllSigned: 可執行已簽署的腳本 Bypass: 不會封鎖任何項目,...