Block certain user agents
3 posts
• Page 1 of 1
Block certain user agents
Hello,
My website has been falling victim to a ddos style attack. There are multiple IP addresses all creating search queries at the same time and bogging down the server. One common thing with them is the user agent string. Here are some examples:
(Windows+NT+5.2;+rv:2.0b13pre)+Gecko/20110304+Firefox/4.0b13pre
(Windows+NT+6.1;+Win64;+x64;+rv:2.0b11pre)+Gecko/20110129+Firefox/4.0b11pre
(X11;+Linux+x86_64;+rv:2.2a1pre)+Gecko/20110324+Firefox/4.2a1pre
they all have a similar pre version that I don't normally see.
Is there a way to block any of these with "pre" in the string?
My website has been falling victim to a ddos style attack. There are multiple IP addresses all creating search queries at the same time and bogging down the server. One common thing with them is the user agent string. Here are some examples:
(Windows+NT+5.2;+rv:2.0b13pre)+Gecko/20110304+Firefox/4.0b13pre
(Windows+NT+6.1;+Win64;+x64;+rv:2.0b11pre)+Gecko/20110129+Firefox/4.0b11pre
(X11;+Linux+x86_64;+rv:2.2a1pre)+Gecko/20110324+Firefox/4.2a1pre
they all have a similar pre version that I don't normally see.
Is there a way to block any of these with "pre" in the string?
Re: Block certain user agents
After reviewing the logs this would also block legit people. What about this instead. I changed the name of the search page, but the bad IP addresses will keep hitting the old page for a while. Is there a way for me to automatically block those IP addresses or at least record them into a file?
Re: Block certain user agents
Hello Johnny,
>I changed the name of the search page, but the bad IP addresses will keep hitting the old page for a while.
>Is there a way for me to automatically block those IP addresses or at least record them into a file?
You may have the following rules to block:
RewriteCond %{REQUEST_URI} ^/old-search-page$ [NC]
RewriteRule .? - [F]
However, recording the IPs into the file is not something out software can do.
>I changed the name of the search page, but the bad IP addresses will keep hitting the old page for a while.
>Is there a way for me to automatically block those IP addresses or at least record them into a file?
You may have the following rules to block:
RewriteCond %{REQUEST_URI} ^/old-search-page$ [NC]
RewriteRule .? - [F]
However, recording the IPs into the file is not something out software can do.
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 24 guests