Take the 2-minute tour ×  What is the easiest way to setup max
login attempts in a LAMP environment (sshd installed via yum)?
Is there a package or simple firewall rule?  share|improve this
question @Hyppy Thanks, I tried searching but unfortunately
there are many poorly named questions/threads. –  John Himmelman
May 31 '11 at 20:27  5 Answers 5  up vote 7 down vote accepted
I use Fail2ban; I've used Denyhosts in the past, and it works
quite well, too. I favor Fail2ban now because it is more
configurable, and more able to handle monitoring multiple
different services -- for example, your sshd and you web app's
login page simultaneously (provided you log failures).  Another
method you might consider is implementing a LIMIT rule in
iptables; I unfortunately can't help you with this, unless you
want to install Shorewall, and then I'd simply point you toward
the excellent documentation on that site for how to configure a
LIMIT rule to, well, limit the ability of someone to brute-force
your server.  share|improve