So you wanna block script kiddies? Most of the new crackers who wanna crack your server they use port scanners, dictionary attacks and what not... Blocking them automatically is the subject of this article.
It discuss how to protect Linux against automated attacks using tools. It is worth to read it. Before reading this I had my small perl script which is used to monitor /var/log/secure and if more login failed attempt found it will send an email to us and then we use to block IPs at router/server itself.