CentOS 7

Instalación fail2ban

[root@nagios ~]# yum install fail2ban
[root@nagios ~]# cat << 'EOF' > /etc/fail2ban/jail.d/sshd.local
[DEFAULT]
bantime = 3600

banaction = iptables-multiport

[sshd]
enabled = true

EOF

[root@nagios ~]# systemctl enable fail2ban
[root@nagios ~]# systemctl start fail2ban
[root@nagios ~]# fail2ban-client status
Status
|- Number of jail:      1
`- Jail list:   sshd