Skip to content
Snippets Groups Projects
Verified Commit 6435a697 authored by David Beniamine's avatar David Beniamine
Browse files

Fail2ban conf buster

parent 1864c535
No related branches found
No related tags found
No related merge requests found
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
# See man 5 jail.conf for details. # See man 5 jail.conf for details.
# #
# [DEFAULT] # [DEFAULT]
# bantime = 3600 # bantime = 1h
# #
# [sshd] # [sshd]
# enabled = true # enabled = true
...@@ -44,10 +44,14 @@ before = paths-debian.conf ...@@ -44,10 +44,14 @@ before = paths-debian.conf
# MISCELLANEOUS OPTIONS # MISCELLANEOUS OPTIONS
# #
# "ignoreip" can be an IP address, a CIDR mask or a DNS host. Fail2ban will not # "ignorself" specifies whether the local resp. own IP addresses should be ignored
# ban a host which matches an address in this list. Several addresses can be # (default is true). Fail2ban will not ban a host which matches such addresses.
# defined using space (and/or comma) separator. #ignorself = true
ignoreip = 127.0.0.1/8
# "ignoreip" can be a list of IP addresses, CIDR masks or DNS hosts. Fail2ban
# will not ban a host which matches an address in this list. Several addresses
# can be defined using space (and/or comma) separator.
#ignoreip = 127.0.0.1/8 ::1
# External command that will take an tagged arguments to ignore, e.g. <ip>, # External command that will take an tagged arguments to ignore, e.g. <ip>,
# and return true if the IP is to be ignored. False otherwise. # and return true if the IP is to be ignored. False otherwise.
...@@ -56,11 +60,11 @@ ignoreip = 127.0.0.1/8 ...@@ -56,11 +60,11 @@ ignoreip = 127.0.0.1/8
ignorecommand = ignorecommand =
# "bantime" is the number of seconds that a host is banned. # "bantime" is the number of seconds that a host is banned.
bantime = 600 bantime = 10m
# A host is banned if it has generated "maxretry" during the last "findtime" # A host is banned if it has generated "maxretry" during the last "findtime"
# seconds. # seconds.
findtime = 600 findtime = 10m
# "maxretry" is the number of failures before a host get banned. # "maxretry" is the number of failures before a host get banned.
maxretry = 5 maxretry = 5
...@@ -113,10 +117,13 @@ logencoding = auto ...@@ -113,10 +117,13 @@ logencoding = auto
enabled = false enabled = false
# "mode" defines the mode of the filter (see corresponding filter implementation for more info).
mode = normal
# "filter" defines the filter to use by the jail. # "filter" defines the filter to use by the jail.
# By default jails have names matching their filter name # By default jails have names matching their filter name
# #
filter = %(__name__)s filter = %(__name__)s[mode=%(mode)s]
# #
...@@ -186,10 +193,11 @@ action_cf_mwl = cloudflare[cfuser="%(cfemail)s", cftoken="%(cfapikey)s"] ...@@ -186,10 +193,11 @@ action_cf_mwl = cloudflare[cfuser="%(cfemail)s", cftoken="%(cfapikey)s"]
# Report block via blocklist.de fail2ban reporting service API # Report block via blocklist.de fail2ban reporting service API
# #
# See the IMPORTANT note in action.d/blocklist_de.conf for when to # See the IMPORTANT note in action.d/blocklist_de.conf for when to use this action.
# use this action. Create a file jail.d/blocklist_de.local containing # Specify expected parameters in file action.d/blocklist_de.local or if the interpolation
# [Init] # `action_blocklist_de` used for the action, set value of `blocklist_de_apikey`
# blocklist_de_apikey = {api key from registration] # in your `jail.local` globally (section [DEFAULT]) or per specific jail section (resp. in
# corresponding jail.d/my-jail.local file).
# #
action_blocklist_de = blocklist_de[email="%(sender)s", service=%(filter)s, apikey="%(blocklist_de_apikey)s", agent="%(fail2ban_agent)s"] action_blocklist_de = blocklist_de[email="%(sender)s", service=%(filter)s, apikey="%(blocklist_de_apikey)s", agent="%(fail2ban_agent)s"]
...@@ -207,6 +215,12 @@ action_badips = badips.py[category="%(__name__)s", banaction="%(banaction)s", ag ...@@ -207,6 +215,12 @@ action_badips = badips.py[category="%(__name__)s", banaction="%(banaction)s", ag
# #
action_badips_report = badips[category="%(__name__)s", agent="%(fail2ban_agent)s"] action_badips_report = badips[category="%(__name__)s", agent="%(fail2ban_agent)s"]
# Report ban via abuseipdb.com.
#
# See action.d/abuseipdb.conf for usage example and details.
#
action_abuseipdb = abuseipdb
# Choose default action. To change, just override value of 'action' with the # Choose default action. To change, just override value of 'action' with the
# interpolation to the chosen action shortcut (e.g. action_mw, action_mwl, etc) in jail.local # interpolation to the chosen action shortcut (e.g. action_mw, action_mwl, etc) in jail.local
# globally (section [DEFAULT]) or per specific section # globally (section [DEFAULT]) or per specific section
...@@ -269,7 +283,7 @@ logpath = %(apache_error_log)s ...@@ -269,7 +283,7 @@ logpath = %(apache_error_log)s
enabled = true enabled = true
port = http,https port = http,https
logpath = %(apache_access_log)s logpath = %(apache_access_log)s
bantime = 172800 bantime = 48h
maxretry = 1 maxretry = 1
...@@ -864,5 +878,21 @@ logpath = /var/log/haproxy.log ...@@ -864,5 +878,21 @@ logpath = /var/log/haproxy.log
[slapd] [slapd]
port = ldap,ldaps port = ldap,ldaps
filter = slapd
logpath = /var/log/slapd.log logpath = /var/log/slapd.log
[domino-smtp]
port = smtp,ssmtp
logpath = /home/domino01/data/IBM_TECHNICAL_SUPPORT/console.log
[phpmyadmin-syslog]
port = http,https
logpath = %(syslog_authpriv)s
backend = %(syslog_backend)s
[zoneminder]
# Zoneminder HTTP/HTTPS web interface auth
# Logs auth failures to apache2 error log
port = http,https
logpath = %(apache_error_log)s
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment