KVM VPS - fail2ban - примеры использования
Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2024
KVM VPS - fail2ban - примеры использования
Вывести весь список заблокинных IP: # awk '($(NF-1) = /Ban/){print $NF}' /var/log/fail2ban.log | sort | uniq -c | sort -n
Вывести список jails для fail2ban:
# fail2ban-client status Status |- Number of jail: 6 `- Jail list: dovecot-iptables, exim-iptables, hestia-iptables, phpmyadmin-auth, recidive, ssh-iptables
Вывод списка забаненных IP для конкретного jail fail2ban:
# fail2ban-client status ssh-iptables Status for the jail: ssh-iptables |- Filter | |- Currently failed: 6 | |- Total failed: 51 | `- File list: /var/log/auth.log `- Actions |- Currently banned: 9 |- Total banned: 9 `- Banned IP list: 72.167.227.34 43.153.192.26 134.209.162.179 43.133.59.215 43.156.152.211 43.134.96.118 43.163.239.153 43.134.25.106 119.28.232.181
Снять блокировку с конкретного IP:
# fail2ban-client set ssh-iptables unbanip 72.167.227.34