fail2ban-regex
This tools can test regular expressions for fail2ban.[1]
Documentation
Examples
- Test a new filter on a log file
fail2ban-regex '/var/log/httpd/error_log' '/etc/fail2ban/filter.d/apache-auth.conf'
Output:
Running tests
=============
Use regex file : /etc/fail2ban/filter.d/apache-auth.conf
Use log file : /var/log/httpd/error_log
Results
=======
Failregex
|- Regular expressions:
| [1] [[]client <HOST>[]] user .* authentication failure
| [2] [[]client <HOST>[]] user .* not found
| [3] [[]client <HOST>[]] user .* password mismatch
|
`- Number of matches:
[1] 0 match(es)
[2] 2 match(es)
[3] 0 match(es)
...
References
- ↑ man 1 'fail2ban-regex'