~ubuntu-branches/ubuntu/saucy/fail2ban/saucy

« back to all changes in this revision

Viewing changes to config/jail.conf

  • Committer: Package Import Robot
  • Author(s): Yaroslav Halchenko
  • Date: 2013-05-13 11:58:56 UTC
  • mfrom: (1.1.15) (10.2.13 sid)
  • Revision ID: package-import@ubuntu.com-20130513115856-x7six9p53qcie0vl
Tags: 0.8.9-1
* New upstream release
  - significant improvements in documentation (Closes: #400416)
  - roundcube auth filter (Closes: #699442)
  - enforces C locale for dates (Closes: #686341)
  - provides bash_completion.d/fail2ban
* debian/jail.conf:
  - added findtime and documentation on those basic options from jail.conf
    (Closes: #704568)
  - added new sample jails definitions for ssh-route, ssh-iptables-ipset{4,6},
    roundcube-auth, sogo-auth, mysqld-auth
* debian/control:
  - suggest system-log-daemon (Closes: #691001)
  - boost policy compliance to 3.9.4
* debian/rules:
  - run fail2ban's unittests at build time but ignore the failures
    (there are still some known issues to fix up to guarantee robust testing
    in clean chroots etc).
    Only pyinotify was added to build-depends since gamin might still be
    buggy on older releases and get stuck, which would complicate
    backporting

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Fail2Ban jail specifications file
2
2
#
3
 
# Comments: use '#' for comment lines and ';' for inline comments
 
3
# Comments: use '#' for comment lines and ';' (following a space) for inline comments
4
4
#
5
5
# Changes:  in most of the cases you should not modify this
6
6
#           file, but provide customizations in jail.local file, e.g.:
46
46
backend = auto
47
47
 
48
48
# "usedns" specifies if jails should trust hostnames in logs,
49
 
#   warn when reverse DNS lookups are performed, or ignore all hostnames in logs
 
49
#   warn when DNS lookups are performed, or ignore all hostnames in logs
50
50
#
51
 
# yes:   if a hostname is encountered, a reverse DNS lookup will be performed.
52
 
# warn:  if a hostname is encountered, a reverse DNS lookup will be performed, 
 
51
# yes:   if a hostname is encountered, a DNS lookup will be performed.
 
52
# warn:  if a hostname is encountered, a DNS lookup will be performed,
53
53
#        but it will be logged as a warning.
54
54
# no:    if a hostname is encountered, will not be used for banning,
55
55
#        but it will be logged as info.
89
89
           sendmail-whois[name=sasl, dest=you@example.com]
90
90
logpath  = /var/log/mail.log
91
91
 
 
92
# ASSP SMTP Proxy Jail
 
93
[assp]
 
94
enabled  = false
 
95
filter   = assp
 
96
action = iptables-multiport[name=assp,port="25,465,587"]
 
97
logpath  = /root/path/to/assp/logs/maillog.txt
 
98
 
92
99
# Here we use TCP-Wrappers instead of Netfilter/Iptables. "ignoreregex" is
93
100
# used to avoid banning the user "myuser".
94
101
 
101
108
ignoreregex = for myuser from
102
109
logpath     = /var/log/sshd.log
103
110
 
 
111
# Here we use blackhole routes for not requiring any additional kernel support
 
112
# to store large volumes of banned IPs
 
113
 
 
114
[ssh-route]
 
115
 
 
116
enabled = false
 
117
filter = sshd
 
118
action = route
 
119
logpath = /var/log/sshd.log
 
120
maxretry = 5
 
121
 
 
122
# Here we use a combination of Netfilter/Iptables and IPsets
 
123
# for storing large volumes of banned IPs
 
124
#
 
125
# IPset comes in two versions. See ipset -V for which one to use
 
126
# requires the ipset package and kernel support.
 
127
[ssh-iptables-ipset4]
 
128
 
 
129
enabled  = false
 
130
filter   = sshd
 
131
action   = iptables-ipset-proto4[name=SSH, port=ssh, protocol=tcp]
 
132
logpath  = /var/log/sshd.log
 
133
maxretry = 5
 
134
 
 
135
[ssh-iptables-ipset6]
 
136
enabled  = false
 
137
filter   = sshd
 
138
action   = iptables-ipset-proto6[name=SSH, port=ssh, protocol=tcp, bantime=600]
 
139
logpath  = /var/log/sshd.log
 
140
maxretry = 5
 
141
 
 
142
# bsd-ipfw is ipfw used by BSD. It uses ipfw tables.
 
143
# table number must be unique.
 
144
 
145
# This will create a deny rule for that table ONLY if a rule 
 
146
# for the table doesn't ready exist.
 
147
#
 
148
[ssh-bsd-ipfw]
 
149
enabled  = false
 
150
filter   = sshd
 
151
action   = bsd-ipfw[port=ssh,table=1]
 
152
logpath  = /var/log/auth.log
 
153
maxretry = 5
 
154
 
104
155
# This jail demonstrates the use of wildcards in "logpath".
105
156
# Moreover, it is possible to give other files on a new line.
106
157
 
172
223
           sendmail[name=Postfix, dest=you@example.com]
173
224
logpath  = /var/log/apache2/error_log
174
225
 
 
226
# Monitor roundcube server
 
227
 
 
228
[roundcube-iptables]
 
229
 
 
230
enabled  = false
 
231
filter   = roundcube-auth
 
232
action   = iptables[name=RoundCube, port="http,https"]
 
233
logpath  = /var/log/roundcube/userlogins
 
234
 
 
235
 
 
236
# Monitor SOGo groupware server
 
237
 
 
238
[sogo-iptables]
 
239
 
 
240
enabled  = false
 
241
filter   = sogo-auth
 
242
port     = http, https
 
243
# without proxy this would be:
 
244
# port    = 20000
 
245
 
 
246
action   = iptables[name=SOGo, port="http,https"]
 
247
logpath  = /var/log/sogo/sogo.log
 
248
 
175
249
# Ban attackers that try to use PHP's URL-fopen() functionality
176
250
# through GET/POST variables. - Experimental, with more than a year
177
251
# of usage in production environments.
201
275
maxretry = 2
202
276
 
203
277
# Same as above for mod_auth
204
 
# It catches wrong authentifications
 
278
# It catches wrong authentications
205
279
 
206
280
[lighttpd-auth]
207
281
 
291
365
logpath  = /var/log/asterisk/messages
292
366
maxretry = 10
293
367
 
 
368
# To log wrong MySQL access attempts add to /etc/my.cnf:
 
369
# log-error=/var/log/mysqld.log
 
370
# log-warning = 2
 
371
[mysqld-iptables]
 
372
 
 
373
enabled  = false
 
374
filter   = mysqld-auth
 
375
action   = iptables[name=mysql, port=3306, protocol=tcp]
 
376
           sendmail-whois[name=MySQL, dest=root, sender=fail2ban@example.com]
 
377
logpath  = /var/log/mysqld.log
 
378
maxretry = 5
 
379
 
 
380
 
294
381
# Jail for more extended banning of persistent abusers
295
382
# !!! WARNING !!!
296
383
#   Make sure that your loglevel specified in fail2ban.conf/.local
306
393
bantime  = 604800  ; 1 week
307
394
findtime = 86400   ; 1 day
308
395
maxretry = 5
 
396
 
 
397
# PF is a BSD based firewall
 
398
[ssh-pf]
 
399
 
 
400
enabled=false
 
401
filter = sshd
 
402
action = pf
 
403
logpath  = /var/log/sshd.log
 
404
maxretry=5
 
405
 
 
406