This will guide you through the process of installing the firewall Fail2Ban. Fail2Ban is written in the programming language Python. We'll be using Debian in this guide but you'll be able to install it on Ubuntu too.
Fail2ban is very effective because it monitors certain files, prevents bruteforcing and gives you a better view on what's going on in your server. We'll also be using the Apache web server
_________________________________________________________________
Start by connecting to your server through SSH and log into your server.
When you're logged in, type apt-get install fail2ban If everything goes fine, you'll see [ ok ] Starting authentication failure monitor: fail2ban., this means that fail2ban is now installed on your server. Time to configure it!