ポイント
log = /var/log/asterisk/full
ディストによってlogは変わる
apt-get purge fail2ban
rm -rf /etc/fail2ban
git clone https://github.com/fail2ban/fail2ban.git
cd fail2ban
sudo python setup.py install
cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
cp files/debian-initd /etc/init.d/fail2ban
update-rc.d fail2ban defaults
service fail2ban start
vi /etc/fail2ban/jail.local
[asterisk] #追記 enabled = true #logを変更する log = /var/log/asterisk/full
fail2ban-client status asterisk で可動確認する
root@intel-nuc:/etc/fail2ban# fail2ban-client status asterisk Status for the jail: asterisk |- Filter | |- Currently failed: 1 | |- Total failed: 25 | `- File list: /var/log/asterisk/full `- Actions |- Currently banned: 13 |- Total banned: 13 `- Banned IP list: 193.46.255.79 188.130.139.67 193.46.255.87 45.134.144.30 193.123.64.151 47.104.199.253 138.91.77.218 192.162.101.232 52.169.252.10 216.244.76.90 69.162.91.150 116.62.16.32 87.98.230.212 root@intel-nuc:/etc/fail2ban#
fail2ban-client status でfail2banのせい
コメント