Is it possible to set the maxretry
parameter of a fail2ban
filter to 0
so that every IP will be banned instantly? The client does not complain about this setting but it does not seem to ban IPs either. So I just wanted to ask whether this actually works.
Setting `maxretry` of fail2ban filter to zero
No, I want to ban someone who already got banned before because of attempted exploitation - But then instantly and for a longer time. –
Inexpressive
For that, you should set a permanent iptable rule on his/her IP if it is ifxed –
Colophon
I think it's a good question. After all, the name of the parameter is "maxretry", not "maxtry". For me it sounds reasonable that the first try is the zeroth retry. –
Kegan
If you define maxretry with 1, after first attempt fail2ban ban the ip instantly. Before of first attempt is impossible(logical)
In my understanding, the word maxretry suggest that it's a try after a try, thus a retry, meaning,
maxretry = 0
should and will work, banning someone/something right after his/its first try. –
Garwin That's true. But banned once, the next attempt also can be banned, if the attempt is within the time
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center. –
Nadianadine
© 2022 - 2025 — McMap. All rights reserved.