mirror of https://github.com/fail2ban/fail2ban
parent
a1eaa5f755
commit
4649cf9608
@ -0,0 +1,21 @@
|
|||||||
|
# Fail2Ban configuration file for SELinux ssh authentication errors
|
||||||
|
#
|
||||||
|
# Author: Daniel Black
|
||||||
|
#
|
||||||
|
#
|
||||||
|
[INCLUDES]
|
||||||
|
|
||||||
|
after = selinux.conf
|
||||||
|
|
||||||
|
[Definition]
|
||||||
|
|
||||||
|
_type = USER_(LOGIN|ERR|AUTH)
|
||||||
|
_uid = 0
|
||||||
|
_auid = \d+
|
||||||
|
_subj = (?:unconfined_u|system_u):system_r:sshd_t:s0-s0:c0\.c1023
|
||||||
|
|
||||||
|
_exe =/usr/sbin/sshd
|
||||||
|
_terminal = ssh
|
||||||
|
|
||||||
|
_msg = op=\S+ acct=(?P<_quote_acct>"?)\S+(?P=_quote_acct) exe="%(_exe)s" hostname=(\?|(\d+\.){3}\d+) addr=<HOST> terminal=%(_terminal)s res=failed
|
||||||
|
|
@ -1,19 +1,18 @@
|
|||||||
# Fail2Ban configuration file for generic Selinux Errors authentication errors
|
# Fail2Ban configuration file for generic SELinux audit messages
|
||||||
#
|
#
|
||||||
# Author: Daniel Black
|
# Author: Daniel Black
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
[Definition]
|
[Definition]
|
||||||
|
|
||||||
_type = USER_(LOGIN|ERR|AUTH)
|
# Things you must set before including this file. See selinux-ssh as an example.
|
||||||
_uid = 0
|
# One of these must include a <HOST>.
|
||||||
_auid = \d+
|
#
|
||||||
_subj = (?:unconfined_u|system_u):system_r:sshd_t:s0-s0:c0\.c1023
|
# _type
|
||||||
|
# _uid
|
||||||
_exe =/usr/sbin/sshd
|
# _auid
|
||||||
_terminal = ssh
|
# _subj
|
||||||
|
# _msg
|
||||||
_msg = op=\S+ acct=(?P<_quote_acct>"?)\S+(?P=_quote_acct) exe="%(_exe)s" hostname=(\?|(\d+\.){3}\d+) addr=<HOST> terminal=%(_terminal)s res=failed
|
|
||||||
|
|
||||||
failregex = ^type=%(_type)s msg=audit\(:\d+\): user pid=\d+ uid=%(_uid)s auid=%(_auid)s ses=\d+ subj=%(_subj)s msg='%(_msg)s'$
|
failregex = ^type=%(_type)s msg=audit\(:\d+\): user pid=\d+ uid=%(_uid)s auid=%(_auid)s ses=\d+ subj=%(_subj)s msg='%(_msg)s'$
|
||||||
|
|
||||||
|
Loading…
Reference in new issue