1. Login to your VPS as root
2. Run the following commands (and press y when asked):
yum install epel-releaseyum install fail2ban3. Now copy the configuration file template:
cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local4. Start up the Fail2Ban service:
service fail2ban restart5. The default settings are usually adequate, but you can further customize Fail2Ban by editing the config file located here:
/etc/fail2ban/jail.local
Make sure to restart the service after changing settings.