Skip to content

Instantly share code, notes, and snippets.

@unceus
Created July 3, 2017 17:19
Show Gist options
  • Save unceus/73228a629aa7f8d122c246032a1e055c to your computer and use it in GitHub Desktop.
Save unceus/73228a629aa7f8d122c246032a1e055c to your computer and use it in GitHub Desktop.
fail2ban fail2ban.conf (monitor fail2ban log file)
# Fail2Ban configuration file
#
# Author: Tom Hendrikx, minor modifications by Amir Caspi
# See http://whyscream.net/wiki/index.php/Fail2ban_monitoring_Fail2ban
#
# $Revision: 1 $
#
[Definition]
# Option: failregex
# Notes.: regex to match the password failures messages in the logfile. The
# host must be matched by a group named "host". The tag "<HOST>" can
# be used for standard IP/hostname matching and is only an alias for
# (?:::f{4,6}:)?(?P<host>[\w\-.^_]+)
# Values: TEXT
#
failregex = fail2ban.actions:\s+WARNING\s+\[(?:.*)\]\s+Ban\s+<HOST>
# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex = fail2ban.actions:\s+WARNING\s+\[fail2ban\]\s+Ban\s+<HOST>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment