Hello,
The following filter for fail2ban should suffice:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~8<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Fail2Ban filter for Monitorix (HTTP built-in server)
#
[INCLUDES]
before = common.conf
[Definition]
# Option: failregex
# Notes.: regex to match the password failures messages in the logfile. The
# host must be matched by a group named "host". The tag
"<HOST>" can
# be used for standard IP/hostname matching and is only an
alias for
# (?:::f{4,6}:)?(?P<host>\S+)
# Values: TEXT
#
_daemon = monitorix-httpd
failregex = NOTEXIST - \[<HOST>\] .*
AUTHERR - \[<HOST>\] .*
NOTALLOWED - \[<HOST>\] .*
# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex =
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~8<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Just let me know if it works for you, and if so, I'll push a new request
to the fail2ban project to include it.
Regards.
On 4/2/20 10:09 AM, Narcis Garcia via Monitorix-general wrote:
htpasswd method with system's crypt() is pretty weak to face brute-force
attacks.
Does somebody have written an adequate fail2ban filter for http attacks
to Monitorix?
Thank you.
--
Jordi Sanfeliu
FIBRANET Network Services Provider
https://www.fibranet.cat
_______________________________________________
Monitorix-general mailing list
Monitorix-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/monitorix-general