On Mon, 23 Aug 2010, Timothy Murphy wrote:
It seems there was some kind of attack against dovecot on my server (CentOS-5.5) with a hundred or so logwatch entries like: ========================================= **Unmatched Entries** dovecot-auth: pam_succeed_if(dovecot:auth): error retrieving information about user admin dovecot-auth: pam_succeed_if(dovecot:auth): error retrieving information about user webmaster =========================================
I googled for this, and it seems quite a common occurrence.
Basically, I'm wondering whether this is best met at the dovecot level, or at my firewall? I'm running shorewall, and I see advice to impose a time-interval between successive attempts like these, but I'm not sure of the best way to do this?
I can recommend pam_shield for something like this. pam_shield is a generic solution for blocking unsuccessful login attempts. You can specify the number of failures within an interval, and after what grace time the entries are removed. I have been using it for years !
pam_shield by default works by null-routing offending IP addresses, but you can also make it add reject tools in iptables if you prefer this.
Since pam_shield works through pam, it is more efficient than anything that scans logfiles and it will work immediately (and not only after some rescan job). And the most important benefit, it works for any service in pam.
pam_shield is available from RPMforge and requires a minimum of configuration.
Kind regards,