Secure server against brute force attacks with fail2ban
(posted 2020.01.23, last updated 2020.08.11)

Tested for Ubuntu 18.04

Using Fail2Ban.

To function properly fail2ban must know the correct log format. I use a customized format for my access.log (to include virtualhost), but have configured a special log file that only logs 404 errors in Common log format.