I'm using the free Fail2ban (https://en.wikipedia.org/wiki/Fail2ban) software to ban brute force ssh login attemps, and it is banning 1-3 IP addresses every day.
Fail2ban scans log files (e.g. /var/log/apache/error_log) and bans IPs that show the malicious signs -- too many password failures, seeking for exploits, etc. Generally Fail2Ban then used to update firewall rules to reject the IP addresses for a specified amount of time, although any arbitrary other action (e.g. sending an email, or ejecting CD-ROM tray) could also be configured. Out of the box Fail2Ban comes with filters for various services (apache, curier, ssh, etc).
http://www.fail2ban.org/
If you can implement the first feature:
Write failed login attempts to a log file, including originating IP address
... then we can use [url=http://www.fail2ban.org/] fail2ban to watch the Mango log file for repeated login failures. Fail2ban will take care of banning the IP address if the number of failed login entries exceeds the allowed number. This would be a fast track to improved security.
How about it?
Source code at https://github.com/fail2ban/fail2ban (not that you would need it).
Thanks.