XaF / fail2ban-subnets

fail2ban-subnets aims to provide a way to ban subnets of IPs repeatingly banned by fail2ban for multiple offenses.
11 stars 3 forks source link

non-working failregex in fail2ban-subnets.py #1

Closed timber74 closed 8 years ago

timber74 commented 8 years ago

I'm using fail2ban 0.8.13 and the failregex in the python script wasn't matching entries in my fail2ban.log. I edited the failregex as follows and it seems to be working now.

failregex = ('%(time)s fail2ban\.actions\[\d+\]:(?: [A-Z]+)? ' + '\[(?!%(donotmatchjail)s\])(?P<JAIL>.*)\] ' + 'Ban (?P<HOST>(?:[0-9]{1,3}\.){3}[0-9]{1,3})$')

XaF commented 8 years ago

Thanks for the report! I'll patch that to make it work with old as well as new versions!