fail2ban/config/fail2ban.conf.shorewall

315 lines
8.6 KiB
Plaintext
Raw Normal View History

# Fail2Ban configuration file
#
2006-03-19 05:20:44 +00:00
# $Revision: 1.2 $
#
# 2005.06.21 modified for readability Iain Lea iain@bricbrac.de
[DEFAULT]
# Option: background
# Notes.: start fail2ban as a daemon. Output is redirect to logfile.
# Values: [true | false] Default: false
#
2006-03-19 05:20:44 +00:00
background = false
# Option: logtargets
# Notes.: log targets. Space separated list of logging targets.
# Values: STDERR SYSLOG file Default: /var/log/fail2ban.log
#
logtargets = /var/log/fail2ban.log
2005-09-20 16:37:44 +00:00
# Option: syslog-target
# Notes.: where to find syslog facility if logtarget SYSLOG.
# Values: SOCKET HOST HOST:PORT Default: /dev/log
#
syslog-target = /dev/log
2005-09-20 16:37:44 +00:00
# Option: syslog-facility
# Notes.: which syslog facility to use if logtarget SYSLOG.
# Values: NUM Default: 1
#
syslog-facility = 1
# Option: pidlock
# Notes.: path of the PID lock file (must be able to write to file).
# Values: FILE Default: /var/run/fail2ban.pid
#
pidlock = /var/run/fail2ban.pid
# Option: maxfailures
# Notes.: number of failures before IP gets banned.
# Values: NUM Default: 5
#
maxfailures = 5
# Option: bantime
2006-03-19 05:20:44 +00:00
# Notes.: number of seconds an IP will be banned. If set to a negative
# value, IP will never be unbanned (permanent banning).
# Values: NUM Default: 600
#
bantime = 600
2005-08-19 08:40:09 +00:00
# Option: findtime
# Notes.: lifetime in seconds of a "failed" log entry.
# Values: NUM Default: 600
#
findtime = 600
# Option: ignoreip
2005-07-13 10:01:01 +00:00
# Notes.: space separated list of IP's to be ignored by fail2ban.
# You can use CIDR mask in order to specify a range.
# Example: ignoreip = 192.168.0.1/24 123.45.235.65
2006-03-19 05:20:44 +00:00
# Values: IP Default:
2005-07-13 10:01:01 +00:00
#
2006-03-19 05:20:44 +00:00
ignoreip =
2005-07-13 10:01:01 +00:00
# Option: cmdstart
# Notes.: command executed once at the start of Fail2Ban
# Values: CMD Default:
#
2006-03-19 05:20:44 +00:00
cmdstart =
2005-07-13 10:01:01 +00:00
# Option: cmdend
2005-08-19 08:40:09 +00:00
# Notes.: command executed once at the end of Fail2Ban.
2005-07-13 10:01:01 +00:00
# Values: CMD Default:
#
2006-03-19 05:20:44 +00:00
cmdend =
# Option: polltime
# Notes.: number of seconds fail2ban sleeps between iterations.
# Values: NUM Default: 1
#
polltime = 1
# Option: reinittime
# Notes.: minimal number of seconds between the re-initialization of
# firewalls due to external changes in their rules (see fwcheck)
# Values: NUM Default: 100
#
reinittime = 10
# Option: maxreinits
# Notes.: maximal number of re-initialization of firewalls due to external
# changes. -1 stays for infinite, so only reinittime is of importance
# Values: NUM Default: -1
#
maxreinits = -1
# NOTE: Interpolations
#
2006-03-19 05:20:44 +00:00
# fwstart, as well as fwend, fwcheck, fwban, fwunban, use interpolations
# so %(__name__)s will be substituted by a name of each section
# (unless the option is overriden in a section).
# If you are going to use interpolations in your setup, please make
# sure that you specified options port and protocol (which also has
# an option in DEFAULT).
#
# Option: fwban
# Notes.: command executed when banning an IP. Take care that the
# command is executed with Fail2Ban user rights.
# Tags: <ip> IP address
# <failures> number of failures
# <failtime> unix timestamp of the last failure
# <bantime> unix timestamp of the ban time
# Values: CMD
# Default: iptables -I INPUT 1 -s <ip> -j DROP
#
2006-03-19 05:20:44 +00:00
fwban = shorewall drop <ip>
# Option: fwunban
# Notes.: command executed when unbanning an IP. Take care that the
# command is executed with Fail2Ban user rights.
# Tags: <ip> IP address
# <bantime> unix timestamp of the ban time
# <unbantime> unix timestamp of the unban time
# Values: CMD
# Default: iptables -D INPUT -s <ip> -j DROP
#
2006-03-19 05:20:44 +00:00
fwunban = shorewall allow <ip>
2005-07-13 10:01:01 +00:00
[MAIL]
# Option: enabled
# Notes.: enable mail notification when banning an IP address.
# Values: [true | false] Default: false
#
enabled = false
# Option: host
# Notes.: host running the mail server.
# Values: STR Default: localhost
#
host = localhost
# Option: port
# Notes.: port of the mail server.
# Values: INT Default: 25
#
port = 25
2006-03-19 05:20:44 +00:00
# Option: user
# Notes.: the username for smtp-server if authentification is required.
# if user is empty, no authentification is done.
# Values: STR Default:
#
user =
# Option: password
# Notes.: the smtp-user's password if authentification is required.
# Values: STR Default:
#
password =
2005-07-13 10:01:01 +00:00
# Option: from
# Notes.: e-mail address of the sender.
# Values: MAIL Default: fail2ban
#
2006-03-19 05:20:44 +00:00
from = fail2ban
2005-07-13 10:01:01 +00:00
# Option: to
# Notes.: e-mail addresses of the receiver. Addresses are space
# separated.
2005-07-13 10:01:01 +00:00
# Values: MAIL Default: root
#
2006-03-19 05:20:44 +00:00
to = root
2005-07-13 10:01:01 +00:00
2005-10-31 22:04:11 +00:00
# Option: localtime
# Notes.: report local time (including timezone) or GMT
# Values: [true | false] Default: false
#
localtime = true
2005-07-13 10:01:01 +00:00
# Option: subject
# Notes.: subject of the e-mail.
2005-09-27 15:45:26 +00:00
# Tags: <section> active section (eg ssh, apache, etc)
# <ip> IP address
2005-07-13 10:01:01 +00:00
# <failures> number of failures
# <failtime> unix timestamp of the last failure
2005-11-21 01:43:13 +00:00
# Values: TEXT Default: [Fail2Ban] <section>: Banned <ip>
2005-07-13 10:01:01 +00:00
#
2005-11-21 01:43:13 +00:00
subject = [Fail2Ban] <section>: Banned <ip>
2005-07-13 10:01:01 +00:00
# Option: message
# Notes.: message of the e-mail.
2005-09-27 15:45:26 +00:00
# Tags: <section> active section (eg ssh, apache, etc)
# <ip> IP address
2005-07-13 10:01:01 +00:00
# <failures> number of failures
# <failtime> unix timestamp of the last failure
# <br> new line
# Values: TEXT Default:
2005-07-13 10:01:01 +00:00
#
message = Hi,<br>
The IP <ip> has just been banned by Fail2Ban after
2005-11-21 01:43:13 +00:00
<failures> attempts against <section>.<br>
Regards,<br>
Fail2Ban
2005-07-13 10:01:01 +00:00
# You can define a new section for each log file to check for
# password failure. Each section has to define the following
2005-07-13 10:01:01 +00:00
# options: logfile, fwban, fwunban, timeregex, timepattern,
# failregex.
2005-11-21 01:43:13 +00:00
[Apache]
# Option: enabled
# Notes.: enable monitoring for this section.
# Values: [true | false] Default: false
#
enabled = false
# Option: logfile
# Notes.: logfile to monitor.
2006-03-19 05:20:44 +00:00
# Values: FILE Default: /var/log/httpd/access_log
#
2006-03-19 05:20:44 +00:00
logfile = /var/log/httpd/access_log
# Option: timeregex
2006-03-19 05:20:44 +00:00
# Notes.: regex to match timestamp in Apache logfile. For TAI64N format,
# use timeregex = @[0-9a-f]{24}
# Values: [Wed Jan 05 15:08:01 2005]
2005-07-13 10:01:01 +00:00
# Default: \S{3} \S{3} \d{2} \d{2}:\d{2}:\d{2} \d{4}
#
timeregex = \S{3} \S{3} \d{2} \d{2}:\d{2}:\d{2} \d{4}
# Option: timepattern
# Notes.: format used in "timeregex" fields definition. Note that '%' must be
2006-03-19 05:20:44 +00:00
# escaped with '%' (see http://rgruet.free.fr/PQR2.3.html#timeModule).
# For TAI64N format, use timepattern = tai64n
# Values: TEXT Default: %%a %%b %%d %%H:%%M:%%S %%Y
#
timepattern = %%a %%b %%d %%H:%%M:%%S %%Y
# Option: failregex
# Notes.: regex to match the password failure messages in the logfile.
2006-03-19 05:20:44 +00:00
# Values: TEXT Default: authentication failure|user .* not found
#
2006-03-19 05:20:44 +00:00
failregex = authentication failure|user .* not found
2006-03-19 05:20:44 +00:00
[VSFTPD]
# Option: enabled
# Notes.: enable monitoring for this section.
# Values: [true | false] Default: false
2006-01-25 14:58:52 +00:00
#
enabled = false
2006-03-19 05:20:44 +00:00
# Option: logfile
# Notes.: logfile to monitor.
# Values: FILE Default: /var/log/secure
2006-01-25 14:58:52 +00:00
#
2006-03-19 05:20:44 +00:00
logfile = /var/log/vsftpd.log
2006-01-25 14:58:52 +00:00
2006-03-19 05:20:44 +00:00
# Option: timeregex
# Notes.: regex to match timestamp in VSFTPD logfile.
# Values: [Mar 7 17:53:28]
# Default: \S{3}\s{1,2}\d{1,2} \d{2}:\d{2}:\d{2}
2006-01-25 15:32:50 +00:00
#
2006-03-19 05:20:44 +00:00
timeregex = \S{3}\s{1,2}\d{1,2} \d{2}:\d{2}:\d{2}
2006-01-25 15:32:50 +00:00
2006-03-19 05:20:44 +00:00
# Option: timepattern
# Notes.: format used in "timeregex" fields definition. Note that '%' must be
# escaped with '%' (see http://rgruet.free.fr/PQR2.3.html#timeModule)
# Values: TEXT Default: %%b %%d %%H:%%M:%%S
2006-01-25 14:58:52 +00:00
#
2006-03-19 05:20:44 +00:00
timepattern = %%b %%d %%H:%%M:%%S
2006-01-25 14:58:52 +00:00
2006-03-19 05:20:44 +00:00
# Option: failregex
# Notes.: regex to match the password failures messages in the logfile.
# Values: TEXT Default: Authentication failure|Failed password|Invalid user
2006-01-25 14:58:52 +00:00
#
2006-03-19 05:20:44 +00:00
failregex = FAIL LOGIN
2006-01-25 14:58:52 +00:00
2005-11-21 01:43:13 +00:00
[SSH]
# Option: enabled
# Notes.: enable monitoring for this section.
# Values: [true | false] Default: true
#
enabled = true
# Option: logfile
# Notes.: logfile to monitor.
2006-03-19 05:20:44 +00:00
# Values: FILE Default: /var/log/secure
#
2006-03-19 05:20:44 +00:00
logfile = /var/log/secure
# Option: timeregex
2006-03-19 05:20:44 +00:00
# Notes.: regex to match timestamp in SSH logfile. For TAI64N format,
# use timeregex = @[0-9a-f]{24}
# Values: [Mar 7 17:53:28]
2005-07-13 10:01:01 +00:00
# Default: \S{3}\s{1,2}\d{1,2} \d{2}:\d{2}:\d{2}
#
timeregex = \S{3}\s{1,2}\d{1,2} \d{2}:\d{2}:\d{2}
# Option: timepattern
# Notes.: format used in "timeregex" fields definition. Note that '%' must be
2006-03-19 05:20:44 +00:00
# escaped with '%' (see http://rgruet.free.fr/PQR2.3.html#timeModule).
# For TAI64N format, use timepattern = tai64n
# Values: TEXT Default: %%b %%d %%H:%%M:%%S
#
timepattern = %%b %%d %%H:%%M:%%S
# Option: failregex
# Notes.: regex to match the password failures messages in the logfile.
2006-03-19 05:20:44 +00:00
# Values: TEXT Default: Authentication failure|Failed password|Invalid user
#
2006-03-19 05:20:44 +00:00
failregex = Authentication failure|Failed password|Invalid user