Hi darklight, Here is a link to an SPI Dynamics whitepaper (.pdf direct link):
http://www.google.com.au/url?sa=t&ct=r...3s6qO8Be2TYBGCAI devour any whitepaper or webcast these guys release so i am a bit biased towards them, sorry. It might be more than you wanted to know but it's worth the read if you are interested in security, and the more people that know how to build secure web apps the better. Raw has stated the best option, rewrite and test, rewrite and test........... oh and research.......
Also, while i agree that IP blocking is usefull, it doesn't cover users with dynamic IP addresses, reset your internet session and you have another address

leaving someone else blocked, security versus functionality strikes again. I don't this problem can ever be truly solved. I may be wrong though, i have been many, many times before.
Cheers, Lucent.