horstvogel
Goto Top

Fail2ban für apache guacmole regex für die filter.d Datei

Hallo, ich möchte gerne meinen guacmole mit fail2ban absichern.


Die Ausgabe in der Apache Logdatei sieht so aus. Ziel ist es die jeweilige IP zu sperren.

23:58:49.431 [https-openssl-nio-8443-exec-10] WARN  o.a.g.r.auth.AuthenticationService - Authentication attempt from [51.218.293.90, 192.168.103.1] for user "max" failed  
.


und die Filter.d Guacamole.conf sieht so aus, bzw. ich habe das schon etwas probiert. die 192.1168.103.1 ist mein Pfsense, die ich vor dem Apache Tomcat als Reverse Proxy mit dem HAProxy nutze.
wie müsste die Config aussehen?


# Fail2Ban configuration file for guacamole
#
# Author: Steven Hiscocks
#

[Definition]

# Option: failregex
# Notes.: regex to match the password failures messages in the logfile.
# Values: TEXT
#
#failregex = ^.*\nWARNING: Authentication attempt from <HOST> for user "[^"]*" failed\.$  
#failregex = ^.*\Authentication attempt from \[<HOST>(?:,.*)?\] for user ".*" failed\.$  
failregex = ^.*\Authentication attempt from \[<HOST>, 192.168.103.1] for user ".*" failed\.$  
# Option:  ignoreregex
# Notes.:  regex to ignore. If this regex matches, the line is ignored.
# Values:  TEXT
#
ignoreregex =

# "maxlines" is number of log lines to buffer for multi-line regex searches  
maxlines = 2

datepattern = ^%%b %%d, %%ExY %%I:%%M:%%S %%p
              ^WARNING:()**
              {^LN-BEG}

Danke! der Horst

Content-Key: 529915

Url: https://administrator.de/contentid/529915

Printed on: April 25, 2024 at 14:04 o'clock

Member: qschulz
qschulz Apr 27, 2020 at 08:07:53 (UTC)
Goto Top
Hallo,
bei mir hat so funktioniert: failregex = Authentication attempt from \[<HOST>, 192.168.103.1] for user "[^"]*" failed\.$