Fail2Ban Regex
Posted: Sat Jul 02, 2022 12:58 pm
Since ZM 1.35+ the login auth has changed resulting in the default Zoneminder fail2ban Regex no longer working
The below is a working Regex for the jail.local file tested on ZM 1.36.19
This is taken from the below site and placed here for others to find easy.
https://github.com/fail2ban/fail2ban/issues/2643
Edit : The above Regex is now taken from the ZM git misc folder.
The below is a working Regex for the jail.local file tested on ZM 1.36.19
This is taken from the below site and placed here for others to find easy.
https://github.com/fail2ban/fail2ban/issues/2643
Code: Select all
[zoneminder]
# Zoneminder HTTP/HTTPS web interface auth
# Logs auth failures from /var/log/zm/web_php.log error log
enabled = true
port = http,https
logpath = /var/log/zm/web_php.log
# Below is the Regex filer that would normally live within the filter.d zoneminder.conf file
filter =
failregex = ^\s*web_php\[\d+\]\.ERR \[<HOST>\].*includes/auth.php
datepattern = ^%%m/%%d/%%y %%H:%%M:%%S(?:\.%%f)