Sshguard is a log monitor. It protects networked hosts from the today’s widespread brute force attacks against services, most notably SSH. It detects such attacks and blocks the author’s address with a firewall rule.
Sshguard monitors servers from their logging activity. It reacts to messages about dangerous activity by blocking the source address with the local firewall.
Messages describing dangerous activity can be easily customized. This makes sshguard usable with any server, and in general anything that logs something. Sshguard supports natively different attack targets, and has the ability to react differently depending on the target service.
Details visit: http://sshguard.sourceforge.net/