mirror of https://github.com/fail2ban/fail2ban
Enhance Guacamole jail
parent
ad51fb7e1e
commit
1707560df8
|
@ -5,21 +5,47 @@
|
||||||
|
|
||||||
[Definition]
|
[Definition]
|
||||||
|
|
||||||
# Option: failregex
|
logging = catalina
|
||||||
# Notes.: regex to match the password failures messages in the logfile.
|
failregex = <L_<logging>/failregex>
|
||||||
# Values: TEXT
|
maxlines = <L_<logging>/maxlines>
|
||||||
#
|
datepattern = <L_<logging>/datepattern>
|
||||||
|
|
||||||
|
[L_catalina]
|
||||||
|
|
||||||
failregex = ^.*\nWARNING: Authentication attempt from <HOST> for user "[^"]*" failed\.$
|
failregex = ^.*\nWARNING: Authentication attempt from <HOST> 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
|
maxlines = 2
|
||||||
|
|
||||||
datepattern = ^%%b %%d, %%ExY %%I:%%M:%%S %%p
|
datepattern = ^%%b %%d, %%ExY %%I:%%M:%%S %%p
|
||||||
^WARNING:()**
|
^WARNING:()**
|
||||||
{^LN-BEG}
|
{^LN-BEG}
|
||||||
|
|
||||||
|
[L_webapp]
|
||||||
|
|
||||||
|
failregex = ^ \[\S+\] WARN \S+ - Authentication attempt from <HOST> for user "<F-USER>[^"]+</F-USER>" failed.
|
||||||
|
|
||||||
|
maxlines = 1
|
||||||
|
|
||||||
|
datepattern = ^%%H:%%M:%%S.%%f
|
||||||
|
|
||||||
|
# DEV Notes:
|
||||||
|
#
|
||||||
|
# failregex is based on the default pattern given in Guacamole documentation :
|
||||||
|
# https://guacamole.apache.org/doc/gug/configuring-guacamole.html#webapp-logging
|
||||||
|
#
|
||||||
|
# The following logback.xml Guacamole configuration file can then be used accordingly :
|
||||||
|
# <configuration>
|
||||||
|
# <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
# <file>/var/log/guacamole.log</file>
|
||||||
|
# <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
# <fileNamePattern>/var/log/guacamole.%d.log.gz</fileNamePattern>
|
||||||
|
# <maxHistory>32</maxHistory>
|
||||||
|
# </rollingPolicy>
|
||||||
|
# <encoder>
|
||||||
|
# <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||||
|
# </encoder>
|
||||||
|
# </appender>
|
||||||
|
# <root level="info">
|
||||||
|
# <appender-ref ref="FILE" />
|
||||||
|
# </root>
|
||||||
|
# </configuration>
|
||||||
|
|
|
@ -440,6 +440,7 @@ backend = %(syslog_backend)s
|
||||||
|
|
||||||
port = http,https
|
port = http,https
|
||||||
logpath = /var/log/tomcat*/catalina.out
|
logpath = /var/log/tomcat*/catalina.out
|
||||||
|
#logpath = /var/log/guacamole.log
|
||||||
|
|
||||||
[monit]
|
[monit]
|
||||||
#Ban clients brute-forcing the monit gui login
|
#Ban clients brute-forcing the monit gui login
|
||||||
|
|
|
@ -10,3 +10,8 @@ WARNING: Authentication attempt from 192.0.2.0 for user "null" failed.
|
||||||
apr 16, 2013 8:32:28 AM org.slf4j.impl.JCLLoggerAdapter warn
|
apr 16, 2013 8:32:28 AM org.slf4j.impl.JCLLoggerAdapter warn
|
||||||
# failJSON: { "time": "2013-04-16T08:32:28", "match": true , "host": "192.0.2.0" }
|
# failJSON: { "time": "2013-04-16T08:32:28", "match": true , "host": "192.0.2.0" }
|
||||||
WARNING: Authentication attempt from 192.0.2.0 for user "pippo" failed.
|
WARNING: Authentication attempt from 192.0.2.0 for user "pippo" failed.
|
||||||
|
|
||||||
|
# filterOptions: {"logging": "webapp"}
|
||||||
|
|
||||||
|
# failJSON: { "time": "2005-08-13T12:57:32", "match": true , "host": "182.23.72.36" }
|
||||||
|
12:57:32.907 [http-nio-8080-exec-10] WARN o.a.g.r.auth.AuthenticationService - Authentication attempt from 182.23.72.36 for user "guacadmin" failed.
|
||||||
|
|
Loading…
Reference in New Issue