How to config a long time ban in Fail2Ban for recurrent IP's
Posted: Fri Jun 28, 2019 9:38 am
You must to add to "/etc/fail2ban/jail.local" file (in Server > Fail2Ban > Configure) the next jail:
This applies a 10 days ban for those IP's that have been banned 3 times in 24 hours or less.
To view banned IP's list (Chain f2b-recidive):
The only way I found to view banned IPs in VestaCP backend is to assigning "recidive" jail to a preexisting ban category and preferably unused (like DB or DNS), adding a new action line:
Code: Select all
[recidive]
enabled = true
maxretry = 3
findtime = 86400
bantime = 864000
To view banned IP's list (Chain f2b-recidive):
Code: Select all
sudo iptables -L
Code: Select all
[recidive]
enabled = true
action = vesta[name=DB]
maxretry = 3
findtime = 86400
bantime = 864000