1 # Fail2Ban configuration file.
3 # This file was composed for Debian systems from the original one
4 # provided now under /usr/share/doc/fail2ban/examples/jail.conf
5 # for additional examples.
7 # To avoid merges during upgrades DO NOT MODIFY THIS FILE
8 # and rather provide your changes in /etc/fail2ban/jail.local
10 # Author: Yaroslav O. Halchenko <debian@onerussian.com>
15 # The DEFAULT allows a global definition of the options. They can be override
16 # in each jail afterwards.
20 # "ignoreip" can be an IP address, a CIDR mask or a DNS host
25 # "backend" specifies the backend used to get files modification. Available
26 # options are "gamin", "polling" and "auto".
27 # yoh: For some reason Debian shipped python-gamin didn't work as expected
28 # This issue left ToDo, so polling is default backend for now
32 # Destination email address used solely for the interpolations in
33 # jail.{conf,local} configuration files.
34 destemail = root@localhost
40 # Default banning action (e.g. iptables, iptables-new,
41 # iptables-multiport, shorewall, etc) It is used to define
42 # action_* variables. Can be overriden globally or per
43 # section within jail.local file
44 banaction = iptables-multiport
46 # email action. Since 0.8.1 upstream fail2ban uses sendmail
47 # MTA for the mailing. Change mta configuration parameter to mail
48 # if you want to revert to conventional 'mail'.
55 # Action shortcuts. To be used to define action parameter
57 # The simplest action to take: ban only
58 action_ = %(banaction)s[name=%(__name__)s, port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
60 # ban & send an e-mail with whois report to the destemail.
61 action_mw = %(action_)s
62 %(mta)s-whois[name=%(__name__)s, dest="%(destemail)s", protocol="%(protocol)s"]
64 # ban & send an e-mail with whois report and relevant log lines
66 action_mwl = %(action_)s
67 %(mta)s-whois-lines[name=%(__name__)s, dest="%(destemail)s", logpath="%(logpath)s"]
69 # Choose default action. To change, just override value of 'action' with the
70 # interpolation to the chosen action shortcut (e.g. action_mw, action_mwl, etc) in jail.local
71 # globally (section [DEFAULT]) or per specific section
78 # Next jails corresponds to the standard configuration in Fail2ban 0.6 which
79 # was shipped in Debian. Enable any defined here jail by including
85 # in /etc/fail2ban/jail.local.
87 # Optionally you may override any other parameter (e.g. banaction,
88 # action, port, logpath, etc) in that section within jail.local
95 logpath = /var/log/auth.log
98 # Generic filter for pam. Has to be used with action which bans all ports
99 # such as iptables-allports, shorewall
103 # pam-generic filter can be customized to monitor specific subset of 'tty's
105 # port actually must be irrelevant but lets leave it all for some possible uses
107 banaction = iptables-allports
109 logpath = /var/log/auth.log
117 banaction = iptables-multiport-log
118 logpath = /var/log/daemon.log
127 logpath = /var/log/auth.log
139 logpath = /var/log/apache*/*error.log
142 # default action is now multiport, so apache-multiport jail was left
143 # for compatibility with previous (<0.7.6-2) releases
149 logpath = /var/log/apache*/*error.log
156 filter = apache-noscript
157 logpath = /var/log/apache*/*error.log
164 filter = apache-overflows
165 logpath = /var/log/apache*/*error.log
175 port = ftp,ftp-data,ftps,ftps-data
177 logpath = /var/log/vsftpd.log
178 # or overwrite it in jails.local to be
179 # logpath = /var/log/auth.log
180 # if you want to rely on PAM failed login attempts
181 # vsftpd's failregex should match both of those formats
188 port = ftp,ftp-data,ftps,ftps-data
190 logpath = /var/log/proftpd/proftpd.log
197 port = ftp,ftp-data,ftps,ftps-data
199 logpath = /var/log/auth.log
212 logpath = /var/log/mail.log
220 logpath = /var/log/mail.log
224 # Mail servers authenticators: might be used for smtp,ftp,imap servers, so
225 # all relevant ports get banned
231 port = smtp,ssmtp,imap2,imap3,imaps,pop3,pop3s
232 filter = courierlogin
233 logpath = /var/log/mail.log
239 port = smtp,ssmtp,imap2,imap3,imaps,pop3,pop3s
241 logpath = /var/log/mail.log
247 # These jails block attacks against named (bind9). By default, logging is off
248 # with bind9 installation. You will need something like this:
251 # channel security_file {
252 # file "/var/log/named/security.log" versions 3 size 30m;
256 # category security {
261 # in your named.conf to provide proper logging
264 # Given filter can lead to DoS attack against your DNS server
265 # since there is no way to assure that UDP packets come from the
272 filter = named-refused
273 logpath = /var/log/named/security.log
280 filter = named-refused
281 logpath = /var/log/named/security.log