1FAIL2BAN-REGEX(1)                User Commands               FAIL2BAN-REGEX(1)
2
3
4

NAME

6       fail2ban-regex - test Fail2ban "failregex" option
7

SYNOPSIS

9       fail2ban-regex [OPTIONS] <LOG> <REGEX> [IGNOREREGEX]
10

DESCRIPTION

12       Fail2Ban  reads log file that contains password failure report and bans
13       the corresponding IP addresses using firewall rules.
14
15       This tools can test regular expressions for "fail2ban".
16
17   LOG:
18       string a string representing a log line
19
20       filename
21              path to a log file (/var/log/auth.log)
22
23       "systemd-journal"
24              search systemd journal (systemd-python required)
25
26   REGEX:
27       string a string representing a 'failregex'
28
29       filename
30              path to a filter file (filter.d/sshd.conf)
31
32   IGNOREREGEX:
33       string a string representing an 'ignoreregex'
34
35       filename
36              path to a filter file (filter.d/sshd.conf)
37

OPTIONS

39       --version
40              show program's version number and exit
41
42       -h, --help
43              show this help message and exit
44
45       -c CONFIG, --config=CONFIG
46              set alternate config directory
47
48       -d DATEPATTERN, --datepattern=DATEPATTERN
49              set custom pattern used to match date/times
50
51       --timezone=TIMEZONE, --TZ=TIMEZONE
52              set time-zone used by convert time format
53
54       -e ENCODING, --encoding=ENCODING
55              File encoding. Default: system locale
56
57       -r, --raw
58              Raw hosts, don't resolve dns
59
60       --usedns=USEDNS
61              DNS specified replacement of tags  <HOST>  in  regexp  ('yes'  -
62              matches all form of hosts, 'no' - IP addresses only)
63
64       -L MAXLINES, --maxlines=MAXLINES
65              maxlines for multi-line regex.
66
67       -m JOURNALMATCH, --journalmatch=JOURNALMATCH
68              journalctl style matches overriding filter file.  "systemd-jour‐
69              nal" only
70
71       -l LOG_LEVEL, --log-level=LOG_LEVEL
72              Log level for the Fail2Ban logger to use
73
74       -V     get version in machine-readable short format
75
76       -v, --verbose
77              Increase verbosity
78
79       --verbosity=VERBOSE
80              Set numerical level of verbosity (0..4)
81
82       --verbose-date, --VD
83              Verbose date patterns/regex in output
84
85       -D, --debuggex
86              Produce debuggex.com urls for debugging there
87
88       --no-check-all
89              Disable check for all regex's
90
91       -o OUT, --out=OUT
92              Set token to print failure information only (row, id,  ip,  msg,
93              host, ip4, ip6, dns, matches, ...)
94
95       --print-no-missed
96              Do not print any missed lines
97
98       --print-no-ignored
99              Do not print any ignored lines
100
101       --print-all-matched
102              Print all matched lines
103
104       --print-all-missed
105              Print all missed lines, no matter how many
106
107       --print-all-ignored
108              Print all ignored lines, no matter how many
109
110       -t, --log-traceback
111              Enrich log-messages with compressed tracebacks
112
113       --full-traceback
114              Either  to  make  the  tracebacks  full,  not  compressed (as by
115              default)
116

AUTHOR

118       Written by Cyril Jaquier <cyril.jaquier@fail2ban.org>.  Many  contribu‐
119       tions  by  Yaroslav  O.  Halchenko,  Steven Hiscocks, Sergey G. Brester
120       (sebres).
121

REPORTING BUGS

123       Report bugs to https://github.com/fail2ban/fail2ban/issues
124
126       Copyright © 2004-2008 Cyril Jaquier, 2008- Fail2Ban Contributors
127       Copyright of modifications held by their respective authors.   Licensed
128       under the GNU General Public License v2 (GPL).
129

SEE ALSO

131       fail2ban-client(1) fail2ban-server(1) jail.conf(5)
132
133
134
135fail2ban-regex 0.11.1            January 2020                FAIL2BAN-REGEX(1)
Impressum