193 |
- |
1 |
# Fail2Ban filter for the Proftpd FTP daemon
|
192 |
- |
2 |
#
|
|
|
3 |
# Set "UseReverseDNS off" in proftpd.conf to avoid the need for DNS.
|
|
|
4 |
# See: http://www.proftpd.org/docs/howto/DNS.html
|
|
|
5 |
# When the default locale for your system is not en_US.UTF-8
|
|
|
6 |
# on Debian-based systems be sure to add this to /etc/default/proftpd
|
|
|
7 |
# export LC_TIME="en_US.UTF-8"
|
|
|
8 |
|
|
|
9 |
[INCLUDES]
|
|
|
10 |
|
|
|
11 |
before = common.conf
|
|
|
12 |
|
|
|
13 |
[Definition]
|
|
|
14 |
|
|
|
15 |
_daemon = proftpd
|
|
|
16 |
|
193 |
- |
17 |
__suffix_failed_login = ([uU]ser not authorized for login|[nN]o such user found|[iI]ncorrect password|[pP]assword expired|[aA]ccount disabled|[iI]nvalid shell: '\S+'|[uU]ser in \S+|[lL]imit (access|configuration) denies login|[nN]ot a UserAlias|[mM]aximum login length exceeded)
|
192 |
- |
18 |
|
|
|
19 |
|
193 |
- |
20 |
prefregex = ^%(__prefix_line)s%(__hostname)s \(\S+\[<HOST>\]\)[: -]+ <F-CONTENT>(?:USER|SECURITY|Maximum) .+</F-CONTENT>$
|
192 |
- |
21 |
|
|
|
22 |
|
193 |
- |
23 |
failregex = ^USER <F-USER>\S+|.*?</F-USER>(?: \(Login failed\))?: %(__suffix_failed_login)s
|
|
|
24 |
^SECURITY VIOLATION: <F-USER>\S+|.*?</F-USER> login attempted
|
|
|
25 |
^Maximum login attempts \(\d+\) exceeded
|
192 |
- |
26 |
|
|
|
27 |
ignoreregex =
|
|
|
28 |
|
|
|
29 |
[Init]
|
|
|
30 |
journalmatch = _SYSTEMD_UNIT=proftpd.service
|
|
|
31 |
|
|
|
32 |
# Author: Yaroslav Halchenko
|
|
|
33 |
# Daniel Black - hardening of regex
|