sudo yum install -y epel-release
sudo yum -y install nano fail2ban
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
sudo nano /etc/fail2ban/jail.local && sudo systemctl enable fail2ban && sudo systemctl restart fail2ban && sudo fail2ban-client status
I Found in Ubuntu jails has enabled = false in the configs, but in CentOS, you have to just paste the folling in a [jail] to active it.