From 86072e3d55629ec0a2b50a6f1621fbf1c8fa3021 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Fri, 8 Feb 2008 00:30:47 -0500 Subject: [PATCH] added pam-generic from dpatch --- config/filter.d/pam-generic.conf | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 config/filter.d/pam-generic.conf diff --git a/config/filter.d/pam-generic.conf b/config/filter.d/pam-generic.conf new file mode 100644 index 00000000..55e9efd0 --- /dev/null +++ b/config/filter.d/pam-generic.conf @@ -0,0 +1,25 @@ +# Fail2Ban configuration file for generic PAM authentication errors +# +# Author: Yaroslav Halchenko +# +# $Revision: $ +# + +[Definition] + +# if you want to catch only login erros from specific daemons, use smth like +#_ttys_re=(?:ssh|pure-ftpd|ftp) +# To catch all failed logins +_ttys_re=\S* + +# +# Shortcuts for easier comprehension of the failregex +__pid_re=(?:\[\d+\]) +__pam_re=\(?pam_unix(?:\(\S+\))?\)?:? +__pam_combs_re=(?:%(__pid_re)s?:\s+%(__pam_re)s|%(__pam_re)s%(__pid_re)s?:) + +# Option: failregex +# Notes.: regex to match the password failures messages in the logfile. +# Values: TEXT +# +failregex = \s\S+ \S+%(__pam_combs_re)s\s+authentication failure; logname=\S* uid=\S* euid=\S* tty=%(_ttys_re)s ruser=\S* rhost=(?:\s+user=.*)?\s*$