aboutsummaryrefslogtreecommitdiffstats
path: root/modules/apache
diff options
context:
space:
mode:
authorDan Fandrich <danf@mageia.org>2024-09-04 10:03:21 -0700
committerDan Fandrich <danf@mageia.org>2024-09-04 10:04:57 -0700
commit4422af8ba6fbcb6aab5b80761b42bb8c1c0dc26b (patch)
tree84f64ee57ac2b4f4110d6be5940ac39ea5f44737 /modules/apache
parent89c56e1cd4acff104cd67f72309938e5ca646793 (diff)
downloadpuppet-4422af8ba6fbcb6aab5b80761b42bb8c1c0dc26b.tar
puppet-4422af8ba6fbcb6aab5b80761b42bb8c1c0dc26b.tar.gz
puppet-4422af8ba6fbcb6aab5b80761b42bb8c1c0dc26b.tar.bz2
puppet-4422af8ba6fbcb6aab5b80761b42bb8c1c0dc26b.tar.xz
puppet-4422af8ba6fbcb6aab5b80761b42bb8c1c0dc26b.zip
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.
Diffstat (limited to 'modules/apache')
-rw-r--r--modules/apache/templates/vhost_fcgid.conf7
1 files changed, 6 insertions, 1 deletions
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 "<html><body>Impolite robots are not allowed</body></html>"