Gentoo Archives: gentoo-user

From: deface <deface@×××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Possibly OT - Denyhosts regex question
Date: Fri, 21 Nov 2008 09:52:26
Message-Id: 492684D7.30106@uberpenguin.net
In Reply to: [gentoo-user] Possibly OT - Denyhosts regex question by James Homuth
1 James Homuth wrote:
2 > Hello folks,
3 >
4 > I'm using the latest stable x86 versions of Denyhosts, Openssh and PAM as
5 > pulled off the portage tree, and am having a little bit of trouble getting
6 > Denyhosts to play nice with the messages PAM is throwing into auth.log. I've
7 > tried google for it, and threw the question to the Denyhosts mailing list,
8 > but neither has turned up any possible assistance. The logs I'm trying to
9 > parse are demonstrated below:
10 > Nov 20 22:21:03 nova sshd[31328]: pam_unix(sshd:auth): authentication
11 > failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=222.233.br
12 > oadband9.iol.cz user=root
13 >
14 > Nov 20 22:21:06 nova sshd[31326]: error: PAM: Authentication failure for
15 > root from 222.233.broadband9.iol.cz
16 >
17 > It's happening with more than just the root user, so I've set up my
18 > userdef_regex's to read as follows:
19 > USERDEF_FAILED_ENTRY_REGEX=error: PAM: authentication failure for
20 > (?P<invalid>invalid user |illegal user )?(?P<user>.*?) from
21 > ?(?P<host>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
22 >
23 > USERDEF_FAILED_ENTRY_REGEX=pam_unix(sshd:auth): authentication failure;
24 > logname= uid=0 euid=0 tty=ssh ruser= rhost=(?P<host>\S+) user=(?P<user>\S+)
25 >
26 >
27 > If anyone can give me a hand figuring out where it is I broke something,
28 > that would be greatly appreciated. As I said, I'm not sure how on-topic it
29 > is for this particular list, but I'm getting nowhere with the avenues that
30 > would probably be more appropriate.
31 >
32 > Thanks in advance,
33 > James
34 >
35 >
36 >
37 Have you looked into Fail2Ban ?