Block certain User-Agents

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 41
Joined: 25 May 2012, 17:31

Block certain User-Agents

20 Nov 2015, 13:51

Hi,

I am under attack by some sort of botnet that is doing a ddos style attack on my site. I am noticing a commonality in the User Agent string and I need help to block them. I tried this line below, but it blaocked anything Mazilla and I just want to block the ones using X11, Linux.

This is one of the bad guys:
Mozilla/5.0+(X11;+Linux)+Gecko+Firefox/5.0

I tried this:
RewriteCond %{HTTP_USER_AGENT} !^Mozilla/5.0+\(X11;\ U;\ Linux\ i686;\ [a-z]{2}-[A-Z]{2};\ rv:[1-9]\.[0-9.]+\)\ Gecko/Debian-[1-9]\.[0-9.]+-[0-9]+\ Galeon/[2-9]\.[0-9.]+\ \(Debian\ package\ [2-9]\.[0-9.]+-[0-9]+\)$
RewriteRule .? - [F]

User avatar
Posts: 402
Joined: 06 Mar 2012, 11:59

Re: Block certain User-Agents

15 Dec 2015, 09:39

Hello.

Sorry for delay, your ticket was lost in the ticketing system because of bug.
I beleive the answer to your initial question is no longer relevant, however, may I propose you to take a look at new mod_antibot module we recently added to Helicon Ape: https://www.helicontech.com/ape/doc/mod_antibot.htm This module is designed to prevent various bot, brute force and DDoS type of attacks, so you may consider protecting your critical resources if they'd be ever subjected to attack again.

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 20 guests