fail2ban will work right out the gate to do what we want it for security purposes. Let's get it installed:
sudo apt update sudo apt install fail2ban
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
You can choose to edit some of the configurations, but the default works well.
sudo nano /etc/fail2ban/jail.local
When you've applied your changes, you can restart the service:
sudo systemctl restart fail2ban
Here are some errors you may encounter.
It appears that fail2ban is not currently running on your server, which is why you're encountering the following error.
fail2ban
sudo systemctl status fail2ban
Active (running): fail2ban is running correctly.
Inactive (dead): fail2ban is installed but not running.
Failed: There was an error starting fail2ban.
sudo systemctl start fail2ban
Last updated 1 year ago