For the last few days one of my websites has been receiving hundreds of requests per minute with non-existent random domains as HTTP_REFERER
and from different IPs (therefore using deny from IP
is not an option):
REMOTE_ADDR | HTTP_REFERER | HTTP_USER_AGENT
95.133.126.178 | 1dljlc2jm2.info | Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; QihooBot 1.0 qihoobot@qihoo.net)
188.232.31.38 | 3r28169e6v4.net | Mozilla/5.0 (compatible; ShunixBot/1.x; http://www.7vlc8pngqk7zmx.com/bot.htm)
177.184.135.114 | 3p10jjujbn.ru | Mozilla/5.0 (compatible; Bot; +http://w4n2e2mte8.ws/spamfilter
188.235.184.231 | 06d94hx.biz | Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iRider 2.21.1108; FDM)
42.119.240.12 | ho0gg8r7.net | Mozilla/3.0 (WorldGate Gazelle 3.5.1 build 11; FreeBSD2.2.8-STABLE)
...
Any ideas how to fight this, please?
UPDATE (after problem was successfully solved)
My question is not a duplicate for I am under DDoS. What can I do? because I knew "what is happening" (small DDoS attack) and therefore I have asked for the exact rules to be added to .htaccess
to block attackers.
BTW, here I am under DDoS. What can I do? is suggested to contact hosting provider. I did, but my hosting provider (one of the most popular ones) proposed to buy a more expensive package with more resources included. :)
Froggiz's solution was exactly what I was looking for.