How to create a custom fail2ban filter and jail to prevent login attempts against the Joomla Administrator back-end website
nano /etc/fail2ban/filter.d/joomla.conf
[Definition] failregex = ^<HOST> -.*(GET|POST|HEAD).*(/administrator/index\.php) ignoreregex =
nano /etc/fail2ban/jail.local
[joomla]
enabled = true
port = http,https
filter = joomla
logpath = /var/log/nginx/*access*log
/var/log/nginx/*error*log
maxretry = 3
service fail2ban stop && service fail2ban start
fail2ban-regex /var/log/nginx/access.log /etc/fail2ban/filter.d/joomla.conf
fail2ban-client status joomla
Comments