1JAIL.CONF(5)                Fail2Ban Configuration                JAIL.CONF(5)
2
3
4

NAME

6       jail.conf - configuration for the fail2ban server
7

SYNOPSIS

9       fail2ban.conf fail2ban.d/*.conf fail2ban.local fail2ban.d/*.local
10
11       jail.conf jail.d/*.conf jail.local jail.d/*.local
12
13       action.d/*.conf action.d/*.local action.d/*.py
14
15       filter.d/*.conf filter.d/*.local
16
17

DESCRIPTION

19       Fail2ban has four configuration file types:
20
21
22       fail2ban.conf
23              Fail2Ban global configuration (such as logging)
24
25       filter.d/*.conf
26              Filters specifying how to detect authentication failures
27
28       action.d/*.conf
29              Actions  defining  the  commands for banning and unbanning of IP
30              address
31
32       jail.conf
33              Jails defining combinations of Filters with Actions.
34
35
36

CONFIGURATION FILES FORMAT

38       *.conf files are distributed  by  Fail2Ban.   It  is  recommended  that
39       *.conf files should remain unchanged to ease upgrades.  If needed, cus‐
40       tomizations should be provided in *.local files.  For example,  if  you
41       would  like  to  enable  the  [ssh-iptables-ipset]  jail  specified  in
42       jail.conf, create jail.local containing
43
44
45       jail.local
46              [ssh-iptables-ipset]
47
48              enabled = true
49
50
51       In .local files specify only the settings you would like to change  and
52       the  rest  of  the  configuration will then come from the corresponding
53       .conf file which is parsed first.
54
55
56       jail.d/ and fail2ban.d/
57
58              In addition to .local, for jail.conf or fail2ban.conf file there
59              can be a corresponding .d/ directory containing additional .conf
60              files. The order e.g. for jail configuration would be:
61
62              jail.conf
63              jail.d/*.conf (in alphabetical order)
64              jail.local
65              jail.d/*.local (in alphabetical order).
66
67              i.e. all .local files are parsed after .conf files in the origi‐
68              nal  configuration  file and files under .d directory.  Settings
69              in the file parsed later take precedence over identical  entries
70              in  previously  parsed files.  Files are ordered alphabetically,
71              e.g.
72
73              fail2ban.d/01_custom_log.conf - to use a different log path
74              jail.d/01_enable.conf - to enable a specific jail
75              jail.d/02_custom_port.conf - to change the port(s) of a jail.
76
77       Configuration files have sections, those specified with [section name],
78       and  name  = value pairs. For those name items that can accept multiple
79       values, specify the values separated by spaces, or  in  separate  lines
80       space indented at the beginning of the line before the second value.
81
82
83       Configuration  files can include other (defining common variables) con‐
84       figuration files, which is often used  in  Filters  and  Actions.  Such
85       inclusions are defined in a section called [INCLUDES]:
86
87
88       before indicates  that  the  specified  file is to be parsed before the
89              current file.
90
91       after  indicates that the specified file is to be parsed after the cur‐
92              rent file.
93
94       Using  Python  "string interpolation" mechanisms, other definitions are
95       allowed and can later be used within other definitions as %(name)s.
96
97       Fail2ban has more advanced syntax (similar python  extended  interpola‐
98       tion).  This  extended  interpolation is using %(section/parameter)s to
99       denote a value from a foreign section.
100       Besides cross section interpolation the value of parameter in [DEFAULT]
101       section can be retrieved with %(default/parameter)s.
102       Fail2ban supports also another feature named %(known/parameter)s (means
103       last known option with name parameter). This interpolation makes possi‐
104       ble to extend a stock filter or jail regexp in .local file (opposite to
105       simply set failregex/ignoreregex that overwrites it), e.g.
106
107              baduseragents = IE|wget|%(my-settings/baduseragents)s
108              failregex = %(known/failregex)s
109                          useragent=%(baduseragents)s
110
111       Additionally to interpolation %(known/parameter)s, that does not  works
112       for  filter/action init parameters, an interpolation tag <known/parame‐
113       ter> can be used (means  last  known  init  definition  of  filters  or
114       actions  with  name  parameter).  This  interpolation makes possible to
115       extend a parameters of stock filter or action directly in  jail  inside
116       jail.conf/jail.local   file   without   creating   a   separately  fil‐
117       ter.d/*.local file, e.g.
118
119              # filter.d/test.conf:
120              [Init]
121              test.method = GET
122              baduseragents = IE|wget
123              [Definition]
124              failregex = ^%(__prefix_line)\s+"<test.method>"\s+test\s+regexp\s+-\s+useragent=(?:<baduseragents>)
125
126              # jail.local:
127              [test]
128              # use filter "test", overwrite method to "POST" and extend known bad agents with "badagent":
129              filter = test[test.method=POST, baduseragents="badagent|<known/baduseragents>"]
130
131       Comments: use '#' for comment lines and '; ' (space is  important)  for
132       inline  comments.  When  using  Python2.X, '; ' can only be used on the
133       first line due to an Python library bug.
134
135

FAIL2BAN CONFIGURATION FILE(S) (fail2ban.conf)

137       The items that can be set in section [Definition] are:
138
139       loglevel
140              verbosity level of log output: CRITICAL, ERROR, WARNING, NOTICE,
141              INFO,  DEBUG,  TRACEDEBUG,  HEAVYDEBUG  or corresponding numeric
142              value (50-5). Default: INFO (equal 20)
143
144       logtarget
145              log target: filename, SYSLOG, STDERR or STDOUT. Default:  STDOUT
146              if not set in fail2ban.conf/fail2ban.local
147              Note. If fail2ban running as systemd-service, for logging to the
148              systemd-journal, the logtarget could be set to STDOUT
149              Only a single log target can be specified.  If you  change  log‐
150              target  from  the  default  value and you are using logrotate --
151              also adjust or disable rotation in the corresponding  configura‐
152              tion file (e.g. /etc/logrotate.d/fail2ban on Debian systems).
153
154       socket socket filename.  Default: /var/run/fail2ban/fail2ban.sock
155              This  is used for communication with the fail2ban server daemon.
156              Do not remove this file when Fail2ban is running. It will not be
157              possible to communicate with the server afterwards.
158
159       pidfile
160              PID filename.  Default: /var/run/fail2ban/fail2ban.pid
161              This is used to store the process ID of the fail2ban server.
162
163       dbfile Database filename. Default: /var/lib/fail2ban/fail2ban.sqlite3
164              This  defines  where the persistent data for fail2ban is stored.
165              This persistent data allows bans to be reinstated  and  continue
166              reading  log  files from the last read position when fail2ban is
167              restarted. A value of None disables this feature.
168
169       dbmaxmatches
170              Max number of matches stored in database per ticket. Default: 10
171              This option sets the max number of matched  log-lines  could  be
172              stored  per  ticket  in  the  database. This also affects values
173              resolvable via tags <ipmatches> and <ipjailmatches> in actions.
174
175       dbpurgeage
176              Database purge age in seconds. Default: 86400 (24hours)
177              This sets the age at which bans should be purged from the  data‐
178              base.
179
180       The config parameters of section [Thread] are:
181
182
183       stacksize
184              Stack  size  of each thread in fail2ban. Default: 0 (platform or
185              configured default)
186              This specifies the stack size (in KiB) to  be  used  for  subse‐
187              quently  created  threads,  and  must be 0 or a positive integer
188              value of at least 32.
189
190

JAIL CONFIGURATION FILE(S) (jail.conf)

192       The following options are applicable to any jail. They appear in a sec‐
193       tion specifying the jail name or in the [DEFAULT] section which defines
194       default values to be used if not specified in the individual section.
195
196       filter name  of   the   filter   --   filename   of   the   filter   in
197              /etc/fail2ban/filter.d/ without the .conf/.local extension.
198              Only one filter can be specified.
199
200       logpath
201              filename(s)  of  the log files to be monitored, separated by new
202              lines.
203              Globs -- paths containing * and ? or [0-9] -- can be  used  how‐
204              ever  only  the  files that exist at start up matching this glob
205              pattern will be considered.
206
207              Optional space separated option 'tail' can be added to  the  end
208              of  the path to cause the log file to be read from the end, else
209              default 'head' option reads file from the beginning
210
211              Ensure syslog or the program that generates the log  file  isn't
212              configured  to  compress repeated log messages to "*last message
213              repeated 5 time*s" otherwise it will fail  to  detect.  This  is
214              called RepeatedMsgReduction in rsyslog and should be Off.
215
216       logencoding
217              encoding of log files used for decoding. Default value of "auto"
218              uses current system locale.
219
220       logtimezone
221              Force the time zone for log lines that don't have one.
222
223              If this option  is  not  specified,  log  lines  from  which  no
224              explicit time zone has been found are interpreted by fail2ban in
225              its own system time zone, and that may turn to be inappropriate.
226              While  the  best practice is to configure the monitored applica‐
227              tions to include explicit offsets, this option is meant to  han‐
228              dle cases where that is not possible.
229
230              The  supported  time  zones  in this option are those with fixed
231              offset: Z, UTC[+-]hhmm (you can also use  GMT  as  an  alias  to
232              UTC).
233
234              This option has no effect on log lines on which an explicit time
235              zone has been found.  Examples:
236
237                      logtimezone = UTC
238                      logtimezone = UTC+0200
239                      logtimezone = GMT-0100
240
241
242       banaction
243              banning action (default iptables-multiport) typically  specified
244              in the [DEFAULT] section for all jails.
245              This  parameter  will  be  used  by the standard substitution of
246              action and can be redefined central  in  the  [DEFAULT]  section
247              inside  jail.local  (to  apply it to all jails at once) or sepa‐
248              rately in each jail, where this substitution will be used.
249
250       banaction_allports
251              the same as banaction but for some "allports" jails  like  "pam-
252              generic" or "recidive" (default iptables-allports).
253
254       action action(s)  from /etc/fail2ban/action.d/ without the .conf/.local
255              extension.
256              Arguments can be passed to actions to override the default  val‐
257              ues  from  the  [Init] section in the action file. Arguments are
258              specified by:
259
260                     [name=value,name2=value,name3="values,values"]
261
262              Values can also be quoted (required when value includes a  ",").
263              More that one action can be specified (in separate lines).
264
265       ignoreself
266              boolean  value  (default  true)  indicates the banning of own IP
267              addresses should be prevented
268
269       ignoreip
270              list of IPs not to ban. They can include a DNS resp.  CIDR  mask
271              too. The option affects additionally to ignoreself (if true) and
272              don't need to contain own DNS resp. IPs of the running host.
273
274       ignorecommand
275              command that is executed to determine if the  current  candidate
276              IP for banning (or failure-ID for raw IDs) should not be banned.
277              The option affects additionally to ignoreself and  ignoreip  and
278              will be first executed if both don't hit.
279              IP will not be banned if command returns successfully (exit code
280              0).  Like ACTION FILES, tags like <ip> are can  be  included  in
281              the  ignorecommand  value  and will be substituted before execu‐
282              tion.
283
284       ignorecache
285              provide cache parameters (default disabled) for  ignore  failure
286              check  (caching  of the result from `ignoreip`, `ignoreself` and
287              `ignorecommand`), syntax:
288
289                      ignorecache = key="<F-USER>@<ip-host>", max-count=100, max-time=5m
290                      ignorecommand = if [ "<F-USER>" = "technical" ] && [ "<ip-host>" = "my-host.example.com" ]; then exit 0; fi;
291                                      exit 1
292              This will cache the result of ignorecommand (does  not  call  it
293              repeatedly)  for  5 minutes (cache time) for maximal 100 entries
294              (cache size),  using  values  substituted  like  "user@host"  as
295              cache-keys.   Set option ignorecache to empty value disables the
296              cache.
297
298       bantime
299              effective ban duration (in seconds or time abbreviation format).
300
301       findtime
302              time interval (in seconds or time  abbreviation  format)  before
303              the current time where failures will count towards a ban.
304
305       maxretry
306              number  of failures that have to occur in the last findtime sec‐
307              onds to ban then IP.
308
309       backend
310              backend to be used to detect changes in the logpath.
311              It defaults to "auto" which will try "pyinotify", "gamin", "sys‐
312              temd"  before  "polling". Any of these can be specified. "pyino‐
313              tify" is only valid on Linux systems with the "pyinotify" Python
314              libraries. "gamin" requires the "gamin" libraries.
315
316       usedns use  DNS  to  resolve  HOST  names  that  appear in the logs. By
317              default it is "warn" which will resolve hostnames to IPs however
318              it  will also log a warning. If you are using DNS here you could
319              be blocking the wrong  IPs  due  to  the  asymmetric  nature  of
320              reverse  DNS (that the application used to write the domain name
321              to log) compared to forward DNS that fail2ban  uses  to  resolve
322              this  back  to an IP (but not necessarily the same one). Ideally
323              you should configure your applications to log a  real  IP.  This
324              can  be  set  to "yes" to prevent warnings in the log or "no" to
325              disable DNS resolution altogether (thus ignoring  entries  where
326              hostname, not an IP is logged)..
327
328       prefregex
329              regex  (Python  regular  expression) to parse a common part con‐
330              taining in every message (see prefregex in section FILTER  FILES
331              for details).
332
333       failregex
334              regex  (Python  regular  expression) to be added to the filter's
335              failregexes (see failregex in section FILTER FILES for details).
336              If this is useful for others using your application please share
337              you regular expression with the fail2ban developers by reporting
338              an issue (see REPORTING BUGS below).
339
340       ignoreregex
341              regex  which,  if the log line matches, would cause Fail2Ban not
342              consider that line.  This  line  will  be  ignored  even  if  it
343              matches a failregex of the jail or any of its filters.
344
345       maxmatches
346              max  number  of  matched log-lines the jail would hold in memory
347              per ticket. By default it is the same value as maxretry of  jail
348              (or  default).   This  option also affects values resolvable via
349              tag <matches> in actions.
350
351
352   Backends
353       Available options are listed below.
354
355       pyinotify
356              requires pyinotify (a file alteration monitor) to be  installed.
357              If pyinotify is not installed, Fail2ban will use auto.
358
359       gamin  requires  Gamin  (a file alteration monitor) to be installed. If
360              Gamin is not installed, Fail2ban will use auto.
361
362       polling
363              uses  a  polling  algorithm  which  does  not  require  external
364              libraries.
365
366       systemd
367              uses systemd python library to access the systemd journal. Spec‐
368              ifying logpath  is  not  valid  for  this  backend  and  instead
369              utilises  journalmatch  from the jails associated filter config.
370              Multiple systemd-specific flags can be passed  to  the  backend,
371              including  journalpath  and  journalfiles, to explicitly set the
372              path to a directory or set  of  files.  journalflags,  which  by
373              default  is  4  and  excludes  user session files, can be set to
374              include them with journalflags=1, see the  python-systemd  docu‐
375              mentation for other settings and further details. Examples:
376
377              backend = systemd[journalpath=/run/log/journal/machine-1]
378              backend = systemd[journalfiles="/path/to/system.journal, /path/to/user.journal"]
379              backend = systemd[journalflags=1]
380
381
382   Actions
383       Each  jail  can  be  configured with only a single filter, but may have
384       multiple actions. By default, the name of a action is the action  file‐
385       name,  and  in  the case of Python actions, the ".py" file extension is
386       stripped. Where multiple of the same action are to be used, the actname
387       option can be assigned to the action to avoid duplication e.g.:
388
389       [ssh-iptables-ipset]
390       enabled = true
391       action = smtp.py[dest=chris@example.com, actname=smtp-chris]
392                smtp.py[dest=sally@example.com, actname=smtp-sally]
393
394

TIME ABBREVIATION FORMAT

396       The  time  entries in fail2ban configuration (like findtime or bantime)
397       can be provided as integer in seconds or as string using special abbre‐
398       viation format (e. g. 600 is the same as 10m).
399
400
401       Abbreviation tokens:
402
403              years?, yea?, yy?
404              months?, mon?
405              weeks?, wee?, ww?
406              days?, da, dd?
407              hours?, hou?, hh?
408              minutes?, min?, mm?
409              seconds?, sec?, ss?
410
411              The question mark (?) means the optional character, so day as well as days can be used.
412
413       You  can  combine multiple tokens in format (separated with space resp.
414       without separator), e. g.: 1y 6mo or 1d12h30m.
415       Note that tokens m as well as mm means minutes, for month use abbrevia‐
416       tion mo or mon.
417
418       The time format can be tested using fail2ban-client:
419
420              fail2ban-client --str2sec 1d12h
421
422

ACTION CONFIGURATION FILES (action.d/*.conf)

424       Action files specify which commands are executed to ban and unban an IP
425       address.
426
427       Like with jail.conf files,  if  you  desire  local  changes  create  an
428       [actionname].local  file  in  the  /etc/fail2ban/action.d directory and
429       override the required settings.
430
431       Action files have two sections, Definition and Init .
432
433       The   [Init]   section    enables    action-specific    settings.    In
434       jail.conf/jail.local  these  can be overridden for a particular jail as
435       options of the action's specification in that jail.
436
437       The following commands can be present in the [Definition] section.
438
439       actionstart
440              command(s) executed when the jail starts.
441
442       actionstop
443              command(s) executed when the jail stops.
444
445       actioncheck
446              command(s) ran before any other action. It aims to verify if the
447              environment is still ok.
448
449       actionban
450              command(s)  that  bans  the  IP address after maxretry log lines
451              matches within last findtime seconds.
452
453       actionunban
454              command(s) that unbans the IP address after bantime.
455
456       The  [Init]   section   allows   for   action-specific   settings.   In
457       jail.conf/jail.local  these can be overwritten for a particular jail as
458       options to the jail. The following are special tags which can be set in
459       the [Init] section:
460
461       timeout
462              The  maximum  period  of time in seconds that a command can exe‐
463              cuted, before being killed.
464
465       Commands specified in the [Definition] section are executed  through  a
466       system  shell  so shell redirection and process control is allowed. The
467       commands should return 0, otherwise error would be logged.  Moreover if
468       actioncheck  exits  with  non-0  status, it is taken as indication that
469       firewall status has changed and fail2ban needs to  reinitialize  itself
470       (i.e. issue actionstop and actionstart commands).  Tags are enclosed in
471       <>.  All the elements of [Init] are  tags  that  are  replaced  in  all
472       action  commands.   Tags  can be added by the fail2ban-client using the
473       "set <JAIL> action <ACT>" command. <br> is a tag that is always  a  new
474       line (\n).
475
476       More  than  a  single  command is allowed to be specified. Each command
477       needs to be on a separate line and indented with whitespace(s)  without
478       blank lines. The following example defines two commands to be executed.
479
480        actionban = iptables -I fail2ban-<name> --source <ip> -j DROP
481                    echo     ip=<ip>,     match=<match>,     time=<time>    >>
482       /var/log/fail2ban.log
483
484
485   Action Tags
486       The following tags are substituted in the  actionban,  actionunban  and
487       actioncheck (when called before actionban/actionunban) commands.
488
489       ip     IPv4 IP address to be banned. e.g. 192.168.0.2
490
491       failures
492              number of times the failure occurred in the log file. e.g. 3
493
494       ipfailures
495              As  per  failures, but total of all failures for that ip address
496              across all jails from the fail2ban persistent  database.  There‐
497              fore the database must be set for this tag to function.
498
499       ipjailfailures
500              As  per  ipfailures, but total based on the IPs failures for the
501              current jail.
502
503       time   UNIX (epoch) time of the ban. e.g. 1357508484
504
505       matches
506              concatenated string of the log file lines of  the  matches  that
507              generated  the  ban.  Many  characters  interpreted by shell get
508              escaped to prevent injection, nevertheless use with caution.
509
510       ipmatches
511              As per matches, but includes all lines for the IP which are con‐
512              tained  with  the  fail2ban  persistent  database. Therefore the
513              database must be set for this tag to function.
514
515       ipjailmatches
516              As per ipmatches, but matches are limited for the IP and for the
517              current jail.
518
519

PYTHON ACTION FILES

521       Python  based  actions  can  also  be used, where the file name must be
522       [actionname].py. The Python file must contain a variable  Action  which
523       points  to  Python class. This class must implement a minimum interface
524       as described by fail2ban.server.action.ActionBase, which can be  inher‐
525       ited from to ease implementation.
526
527

FILTER FILES (filter.d/*.conf)

529       Filter  definitions are those in /etc/fail2ban/filter.d/*.conf and fil‐
530       ter.d/*.local.
531
532       These are used to identify failed authentication attempts in log  files
533       and to extract the host IP address (or hostname if usedns is true).
534
535       Like  action files, filter files are ini files. The main section is the
536       [Definition] section.
537
538       There are several standard filter definitions used in the  [Definition]
539       section:
540
541       prefregex
542              is  the  regex  (regular expression) to parse a common part con‐
543              taining in every message, which  is  applied  after  datepattern
544              found  a  match,  before  the search for any failregex or ignor‐
545              eregex would start.
546              If this regex doesn't match the process is starting  immediately
547              with next message and search for any failregex does not occur.
548              If  prefregex  contains  <F-CONTENT>...</F-CONTENT>, the part of
549              message enclosed between this tags will be  extracted  and  her‐
550              after  used as whole message for search with failregex or ignor‐
551              eregex.
552
553              For example:
554                      prefregex = ^%(__prefix_line)s (?:ERROR|FAILURE) <F-CONTENT>.+</F-CONTENT>$
555                      failregex = ^user not found
556                                  ^authentication failed
557                                  ^unknown authentication method
558
559              You can use prefregex in order to:
560
561                     - specify 1  common  regex  to  match  some  common  part
562                     present  in  every  messages  (do avoid unneeded match in
563                     every failregex if you have more as one);
564
565                     - to cut some interesting part of message only  (to  sim‐
566                     plify  failregex)  enclosed  between tags <F-CONTENT> and
567                     </F-CONTENT>;
568
569                     - to gather some failure identifier (e.  g.  some  prefix
570                     matched  by  <F-MLFID>...<F-MLFID/> tag) to identify sev‐
571                     eral messages belonging to same session, where a  connect
572                     message containing IP followed by failure message(s) that
573                     are not contain IP; this provides a new multi-line  pars‐
574                     ing  method  as replacement for old (slow an ugly) multi-
575                     line parsing using buffering window  (maxlines  >  1  and
576                     <SKIPLINES>);
577
578                     -  to  ignore  some wrong, too long or even unneeded mes‐
579                     sages (a.k.a. parasite log traffic)  which  can  be  also
580                     present  in  journal,  before failregex search would take
581                     place.
582
583
584       failregex
585              is  the  regex  (regular  expression)  that  will  match  failed
586              attempts.  The  standard replacement tags can be used as part of
587              the regex:
588
589                     <HOST> - common regex for IP addresses and hostnames  (if
590                     usedns  is  enabled). Fail2Ban will work out which one of
591                     these it actually is.
592
593                     <ADDR> - regex for IP addresses (both families).
594
595                     <IP4> - regex for IPv4 addresses.
596
597                     <IP6> - regex for IPv6 addresses  (also  IP  enclosed  in
598                     brackets).
599
600                     <DNS> - regex to match hostnames.
601
602                     <CIDR>  - helper regex to match CIDR (simple integer form
603                     of net-mask).
604
605                     <SUBNET> - regex to match sub-net adresses  (in  form  of
606                     IP/CIDR,  also  single  IP  is  matched, so part /CIDR is
607                     optional).
608
609              NOTE: the failregex will be applied to  the  remaining  part  of
610              message after prefregex processing (if specified), which in turn
611              takes place after datepattern processing (whereby the string  of
612              timestamp matching the best pattern, cut out from the message).
613
614              For  multiline regexs (parsing with maxlines greater that 1) the
615              tag <SKIPLINES> can be used to separate lines. This allows lines
616              between  the  matched lines to continue to be searched for other
617              failures. The tag can be used multiple times.
618              This is an obsolete handling and if the lines contain some  com‐
619              mon  identifier,  better would be to use new handling (with tags
620              <F-MLFID>...<F-MLFID/>).
621
622
623       ignoreregex
624              is the regex to identify log entries that should be  ignored  by
625              Fail2Ban, even if they match failregex.
626
627
628       maxlines
629              specifies  the maximum number of lines to buffer to match multi-
630              line regexs. For some log formats this will not required  to  be
631              changed. Other logs may require to increase this value if a par‐
632              ticular log file is frequently written to.
633
634       datepattern
635              specifies a custom date pattern/regex as an alternative  to  the
636              default date detectors e.g. %%Y-%%m-%%d %%H:%%M(?::%%S)?.  For a
637              list of valid format directives, see Python  library  documenta‐
638              tion for strptime behaviour.
639              NOTE:  due  to config file string substitution, that %'s must be
640              escaped by an % in config files.
641              Also, special values  of  Epoch  (UNIX  Timestamp),  TAI64N  and
642              ISO8601 can be used as datepattern.
643              Normally  the regexp generated for datepattern additionally gets
644              word-start and word-end boundaries  to  avoid  accidental  match
645              inside  of  some  word in a message.  There are several prefixes
646              and words with special meaning that could be specified with cus‐
647              tom datepattern to control resulting regex:
648
649                     {DEFAULT}  -  can be used to add default date patterns of
650                     fail2ban.
651
652                     {DATE} - can be used  as  part  of  regex  that  will  be
653                     replaced with default date patterns.
654
655                     {^LN-BEG}  -  prefix  (similar  to ^) changing word-start
656                     boundary to line-start boundary (ignoring up to 2 charac‐
657                     ters).  If  used as value (not as a prefix), it will also
658                     set all default date patterns (similar to {DEFAULT}), but
659                     anchored at begin of message line.
660
661                     {UNB}  -  prefix  to disable automatic word boundaries in
662                     regex.
663
664                     {NONE} - value would allow to find failures totally with‐
665                     out  date-time  in  log message. Filter will use now as a
666                     timestamp (or last known  timestamp  from  previous  line
667                     with timestamp).
668
669       journalmatch
670              specifies  the  systemd journal match used to filter the journal
671              entries. See  journalctl(1)  and  systemd.journal-fields(7)  for
672              matches  syntax and more details on special journal fields. This
673              option is only valid for the systemd backend.
674
675       Similar to actions, filters may have an [Init] section  also  (optional
676       since  v.0.10). All parameters of both sections [Definition] and [Init]
677       can be overridden (redefined or extended) in  jail.conf  or  jail.local
678       (or  in  related filter.d/filter-name.local).  Every option supplied in
679       the jail to the filter overwrites the value specified  in  [Init]  sec‐
680       tion,  which in turm would overwrite the value in [Definition] section.
681       Besides the standard settings of filter both sections can  be  used  to
682       initialize filter-specific options.
683
684       Filters can also have a section called [INCLUDES]. This is used to read
685       other configuration files.
686
687
688       before indicates that this file is read before  the  [Definition]  sec‐
689              tion.
690
691
692       after  indicates that this file is read after the [Definition] section.
693
694

AUTHOR

696       Fail2ban     was     originally     written     by     Cyril    Jaquier
697       <cyril.jaquier@fail2ban.org>.  At the moment it is maintained and  fur‐
698       ther developed by Yaroslav O. Halchenko <debian@onerussian.com>, Daniel
699       Black  <daniel.subs@internode.on.net>  and  Steven  Hiscocks   <steven-
700       fail2ban@hiscocks.me.uk>  along  with  a  number  of contributors.  See
701       THANKS file shipped with Fail2Ban for a full list.  Manual page written
702       by Daniel Black and Yaroslav Halchenko.
703

REPORTING BUGS

705       Report bugs to https://github.com/fail2ban/fail2ban/issues
706
708       Copyright © 2013 the Fail2Ban Team
709       Copyright of modifications held by their respective authors.
710       Licensed  under  the  GNU  General  Public License v2 (GPL) or (at your
711       option) any later version.
712

SEE ALSO

714       fail2ban-server(1)
715
716
717
718Fail2Ban                         November 2015                    JAIL.CONF(5)
Impressum