Difference between revisions of "Talk:ProFTPd"
Lostcontrol (talk | contribs) |
|||
| Line 35: | Line 35: | ||
---- | ---- | ||
| + | |||
| + | |||
| + | As Yaroslav Halchenko mentioned right in the mailing list each failregex has to contain \s+$ at the end. | ||
| + | <pre> | ||
| + | [Definition] | ||
| + | |||
| + | # Option: failregex | ||
| + | # Notes.: regex to match the password failures messages in the logfile. The | ||
| + | # host must be matched by a group named "host". The tag "<HOST>" can | ||
| + | # be used for standard IP/hostname matching and is only an alias for | ||
| + | # (?:::f{4,6}:)?(?P<host>\S+) | ||
| + | # Values: TEXT | ||
| + | # | ||
| + | # failregex = \(\S+\[<HOST>\]\)[: -]+ USER \S+: no such user found from \S+ \[[0-9.]+\] to \S+:\S+$ | ||
| + | failregex = \(\S+\[<HOST>\]\)[: -]+ USER \S+: no such user found from \S+ \[[0-9.]+\] to \S+:\S+\s+$ | ||
| + | \(\S+\[<HOST>\]\)[: -]+ USER \S+ \(Login failed\): Incorrect password\.\s+$ | ||
| + | \(\S+\[<HOST>\]\)[: -]+ USER \S+ \(Login failed\): No such user found\.\s+$ | ||
| + | \(\S+\[<HOST>\]\)[: -]+ SECURITY VIOLATION: \S+ login attempted\.\s+$ | ||
| + | \(\S+\[<HOST>\]\)[: -]+ Maximum login attempts \(\d+\) exceeded\s+$ | ||
| + | |||
| + | # Option: ignoreregex | ||
| + | # Notes.: regex to ignore. If this regex matches, the line is ignored. | ||
| + | # Values: TEXT | ||
| + | # | ||
| + | ignoreregex = | ||
| + | </pre> | ||
| + | |||
| + | I've just tested it with fail2ban 0.8.2-3 on Debian etch 4.0 | ||
| + | Before this change i had also the problem, that fail2ban didn't react on bad login attempts on ftp. | ||
| + | |||
| + | ---- | ||
| + | |||
| + | |||
| + | |||
Please do not ask for help here. There are instructions [[FAQ_english#How_to_ask_for_help_or_submit_a_bug_report_or_a_feature_request.3F|here]]. Thanks. --[[User:Lostcontrol|Lostcontrol]] 13:58, 5 July 2007 (CEST) | Please do not ask for help here. There are instructions [[FAQ_english#How_to_ask_for_help_or_submit_a_bug_report_or_a_feature_request.3F|here]]. Thanks. --[[User:Lostcontrol|Lostcontrol]] 13:58, 5 July 2007 (CEST) | ||
Revision as of 12:30, 24 July 2008
failregex = USER \S+: no such user found from \S* ?\[<HOST>\] to \S+\s*$
/var/log/secure:Jul 3 14:33:30 xkmail proftpd[12639]: xkmail.hopto.org (pe1950-2.sni.ne.jp[61.7.1.109]) - USER adriana: no such user found from pe1950-2.sni.ne.jp [61.7.1.109] to 71.105.58.80:21
I got hit by this about 1400 times today but fail2ban did not jail ip address.
Is the jail.conf wrong? kevin@xkmail.hopto.org ver .80 fedora 4
# Fail2Ban configuration file
#
# Author: Yaroslav Halchenko
#
# $Revision: 510 $
#
[Definition]
# Option: failregex
# Notes.: regex to match the password failures messages in the logfile. The
# host must be matched by a group named "host". The tag "<HOST>" can
# be used for standard IP/hostname matching and is only an alias for
# (?:::f{4,6}:)?(?P<host>\S+)
# Values: TEXT
#
failregex = USER \S+: no such user found from \S* ?\[<HOST>\] to \S+\s*$
# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex =
As Yaroslav Halchenko mentioned right in the mailing list each failregex has to contain \s+$ at the end.
[Definition]
# Option: failregex
# Notes.: regex to match the password failures messages in the logfile. The
# host must be matched by a group named "host". The tag "<HOST>" can
# be used for standard IP/hostname matching and is only an alias for
# (?:::f{4,6}:)?(?P<host>\S+)
# Values: TEXT
#
# failregex = \(\S+\[<HOST>\]\)[: -]+ USER \S+: no such user found from \S+ \[[0-9.]+\] to \S+:\S+$
failregex = \(\S+\[<HOST>\]\)[: -]+ USER \S+: no such user found from \S+ \[[0-9.]+\] to \S+:\S+\s+$
\(\S+\[<HOST>\]\)[: -]+ USER \S+ \(Login failed\): Incorrect password\.\s+$
\(\S+\[<HOST>\]\)[: -]+ USER \S+ \(Login failed\): No such user found\.\s+$
\(\S+\[<HOST>\]\)[: -]+ SECURITY VIOLATION: \S+ login attempted\.\s+$
\(\S+\[<HOST>\]\)[: -]+ Maximum login attempts \(\d+\) exceeded\s+$
# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex =
I've just tested it with fail2ban 0.8.2-3 on Debian etch 4.0 Before this change i had also the problem, that fail2ban didn't react on bad login attempts on ftp.
Please do not ask for help here. There are instructions here. Thanks. --Lostcontrol 13:58, 5 July 2007 (CEST)