mirror of https://github.com/fail2ban/fail2ban
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.2 KiB
32 lines
1.2 KiB
# Fail2Ban configuration file for named (bind9). Trying to generalize the
|
|
# structure which is general to capture general patterns in log
|
|
# lines to cover different configurations/distributions
|
|
#
|
|
# Author: Yaroslav Halchenko
|
|
#
|
|
#
|
|
|
|
[Definition]
|
|
|
|
#
|
|
# Daemon name
|
|
_daemon=named
|
|
|
|
#
|
|
# Shortcuts for easier comprehension of the failregex
|
|
__pid_re=(?:\[\d+\])
|
|
__daemon_re=\(?%(_daemon)s(?:\(\S+\))?\)?:?
|
|
__daemon_combs_re=(?:%(__pid_re)s?:\s+%(__daemon_re)s|%(__daemon_re)s%(__pid_re)s?:)
|
|
# hostname daemon_id spaces
|
|
# this can be optional (for instance if we match named native log files)
|
|
__line_prefix=(?:\s\S+ %(__daemon_combs_re)s\s+)?
|
|
|
|
|
|
# note - (\.\d+)? is a really ugly catch of the microseconds not captured in
|
|
# in the date detector
|
|
#
|
|
failregex = ^%(__line_prefix)s(\.\d+)?( error:)?\s*client <HOST>#\S+( \([\S.]+\))?: (view (internal|external): )?query(?: \(cache\))? '.*' denied\s*$
|
|
^%(__line_prefix)s(\.\d+)?( error:)?\s*client <HOST>#\S+( \([\S.]+\))?: zone transfer '\S+/AXFR/\w+' denied\s*$
|
|
^%(__line_prefix)s(\.\d+)?( error:)?\s*client <HOST>#\S+( \([\S.]+\))?: bad zone transfer request: '\S+/IN': non-authoritative zone \(NOTAUTH\)\s*$
|
|
|