cirandas.net-etc

commit 6c3c77c34198186185a91161fef292a750a31a74

Author: Pedro Lucas Porcellis <porcellis@eletrotupi.com>

nginx: blackhole aggressive bots

 nginx/cirandas | 10 +++++-----


diff --git a/nginx/cirandas b/nginx/cirandas
index 54cf32d253bfc53f28283a4fa27202b2509d98c9..a21091945739d2f9e7053117a4e288d93183e9cf 100644
--- a/nginx/cirandas
+++ b/nginx/cirandas
@@ -167,15 +167,15 @@   }
 
   location / {
     if ($http_user_agent = "") {
-      return 403;
+      return 444;
     }
     if ($http_user_agent = "-") {
-      return 403;
+      return 444;
     }
 
-	# Also handled on the robots.txt file
-    if ($http_user_agent ~ (SemrushBot|msnbot|Purebot|Baiduspider|Lipperhey|Mail.Ru|scrapbot|MJ12bot|AhrefsBot|YandexBot|BDCbot|MegaIndex|UniLeipzigASV|DotBot|Typhoeus|Bingbot) ) {
-      return 403;
+    if ($http_user_agent ~ (SemrushBot|msnbot|Purebot|Baiduspider|Lipperhey|Mail.Ru|scrapbot|MJ12bot|AhrefsBot|YandexBot|BDCbot|MegaIndex|UniLeipzigASV|DotBot|Typhoeus|Bingbot|bingbot|Yandex|Knowledge|PetalBot) ) {
+      access_log off;
+      return 444;
     }
 
     try_files index.html $uri @proxy;