====== 安裝 fail2ban Agent 的方式 ====== * 返回 [[tech:librenms]] * 這是 SNMP Extend * 至 fail2ban 主機內安裝 wget https://github.com/librenms/librenms-agent/raw/master/snmp/fail2ban -O /etc/snmp/fail2ban chmod +x /etc/snmp/fail2ban * 確認 fail2ban 可以正確執行 /etc/snmp/fail2ban 如果正確執行應該可以看到類似的訊息 {"version":"1","error":"0","errorString":"fail2ban-client exited with 0","data":{"jails":{"roundcube-iredmail":"0","postfix-pregreet-iredmail":"1","postfix-iredmail":"0","dovecot-iredmail":"0","sshd":"0","nginx-http-auth":"0"},"total":1}} * 修改 snmpd 設定 vi /etc/snmp/snmpd.conf : extend fail2ban /etc/snmp/fail2ban 重新啟動 snmpd systemctl restart snmpd ===== 參考網址 ===== * https://docs.librenms.org/Extensions/Applications/#fail2ban {{tag>librenms agent snmp_ext}}