Stopping apache attack

I was googling around, and found this :

http://mediakey.dk/~cc/block-referer-spam/

It seems there is a special module for apache2 to prevent referrer spam.

or

A more manual method with iptables :

http://www.iospirit.com/blog/article/12/Linux-HowTo-Defeating-referer-spam/


If you want your server public there will be no way to stop it completely, but what you can do is use mod_evasive to intelligently block hosts making too many requests and/or mod security to match patterns and block hosts based on patterns.

Likely these will go away eventually