Fail2Ban - automated prevention help
Blocks IPs after it has determined that the IP trying to get in is a 'bad guy' - great for SSH servers and other services that are commonly attacked brute-force style.
A great HOWTO writeup is here:
http://www.the-art-of-web.com/system/fail2ban/
You could always get real clever and do port knocking but that is sometimes a hassle.