Articles | testi-pannu.net


Fail2ban - Keep hackers (mostly amazon bots) at bay

Published: 2022-11-05 17:59:31, by Jussi Jokinen.

Sometimes securing your server is not pain in the ass

Sometimes securing your server is not pain in the ass

With fail2ban you can easily restrict the access to your virtual server.


The installation is quite simple, atleast on the Ubuntu environment.

Run the command,

sudo apt install fail2ban

Then of course you need to configure it.

Run the following command,

cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local

Then edit the local file, the important parts are the ignoreip (whitelist) bantime, findtime and maxretry.

Then you can determinate those jails, like if your server got too many unsuccessful login attempts, you can enable them, by setting them enabled. Then enter the bantime, findtime, maxretry and ingnoreip.

Basically, that's quite simple and if you have any questions, let me hear and also you can contact me.


Read more