192 |
- |
1 |
# Fail2Ban fitler for the Proftpd FTP daemon
|
|
|
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 |
|
|
|
17 |
__suffix_failed_login = (User not authorized for login|No such user found|Incorrect password|Password expired|Account disabled|Invalid shell: '\S+'|User in \S+|Limit (access|configuration) denies login|Not a UserAlias|maximum login length exceeded).?
|
|
|
18 |
|
|
|
19 |
|
|
|
20 |
prefregex = ^%(__prefix_line)s%(__hostname)s \(\S+\[<HOST>\]\)[: -]+ <F-CONTENT>(?:USER|SECURITY|Maximum).+</F-CONTENT>$
|
|
|
21 |
|
|
|
22 |
|
|
|
23 |
failregex = ^USER .*: no such user found from \S+ \[\S+\] to \S+:\S+ *$
|
|
|
24 |
^USER .* \(Login failed\): %(__suffix_failed_login)s\s*$
|
|
|
25 |
^SECURITY VIOLATION: .* login attempted\. *$
|
|
|
26 |
^Maximum login attempts \(\d+\) exceeded *$
|
|
|
27 |
|
|
|
28 |
ignoreregex =
|
|
|
29 |
|
|
|
30 |
[Init]
|
|
|
31 |
journalmatch = _SYSTEMD_UNIT=proftpd.service
|
|
|
32 |
|
|
|
33 |
# Author: Yaroslav Halchenko
|
|
|
34 |
# Daniel Black - hardening of regex
|