From 4422af8ba6fbcb6aab5b80761b42bb8c1c0dc26b Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Wed, 4 Sep 2024 10:03:21 -0700 Subject: Block a couple of IP address ranges on svnweb There was a bot there was hammering us for weeks, but which doesn't identify itself in the User-Agent string. Also, add another couple of bot User-Agent strings. --- modules/apache/templates/vhost_fcgid.conf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/apache/templates/vhost_fcgid.conf b/modules/apache/templates/vhost_fcgid.conf index c44f9ea6..288b5aa2 100644 --- a/modules/apache/templates/vhost_fcgid.conf +++ b/modules/apache/templates/vhost_fcgid.conf @@ -18,7 +18,12 @@ RewriteRule . - [R=403,L] # bunch). "Expensive" is considered to be most operations other than showing a # directory or downloading a specific version of a file. RewriteCond %{QUERY_STRING} pathrev=|annotate=|view=log|r1= -RewriteCond %{HTTP_USER_AGENT} "Googlebot|bingbot|Yahoo! Slurp|ClaudeBot|Amazonbot|YandexBot|SemrushBot|Barkrowler|DataForSeoBot|PetalBot|facebookexternalhit|GPTBot|spider|Spider" +RewriteCond %{HTTP_USER_AGENT} "Googlebot|bingbot|Yahoo! Slurp|ClaudeBot|Amazonbot|YandexBot|SemrushBot|Barkrowler|DataForSeoBot|PetalBot|facebookexternalhit|GPTBot|ImagesiftBot|spider|Spider" +RewriteRule . - [R=403,L] + +# Block abusive spiders by IP address who don't identify themselves in the +# User-Agent: string +RewriteCond expr "-R '47.76.99.0/24' || -R '47.76.209.0/24'" RewriteRule . - [R=403,L] ErrorDocument 403 "Impolite robots are not allowed" -- cgit v1.2.1