fail2ban/config/filter.d/sshd.conf

31 lines
1.2 KiB
Plaintext

# Fail2Ban configuration file
#
# Author: Cyril Jaquier
#
# $Revision$
#
[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 = <TIME> <PREFIX> (?:error: PAM: )?Authentication failure for .* from <HOST>\s*$
<TIME> <PREFIX> Failed [-/\w]+ for .* from <HOST>(?: port \d*)?(?: ssh\d*)?$
<TIME> <PREFIX> ROOT LOGIN REFUSED.* FROM <HOST>\s*$
<TIME> <PREFIX> [iI](?:llegal|nvalid) user .* from <HOST>\s*$
<TIME> <PREFIX> User \S+ from <HOST> not allowed because not listed in AllowUsers$
<TIME> <PREFIX> authentication failure; logname=\S* uid=\S* euid=\S* tty=\S* ruser=\S* rhost=<HOST>(?:\s+user=.*)?\s*$
<TIME> <PREFIX> refused connect from \S+ \(<HOST>\)\s*$
<TIME> <PREFIX> Address <HOST> .* POSSIBLE BREAK-IN ATTEMPT\s*$
# Option: ignoreregex
# Notes.: regex to ignore. If this regex matches, the line is ignored.
# Values: TEXT
#
ignoreregex =