Prawidłowe blokowanie botów w htaccess


(janusz_pro) #1

Witam

 

Chciałbym żeby ktoś mi potwierdził czy w prawidłowy sposób blokuje boty w htaccess, bo nie wiem czy nie za dużo tych reguł i czy jedne innych nie wykluczają.

 

RewriteCond %{HTTP_USER_AGENT} ^Morfeus
RewriteRule ^.*$ - [F]
RewriteCond %{HTTP_USER_AGENT} twiceler [NC]
RewriteRule .*   - [F]
RewriteCond %{HTTP_USER_AGENT} YandexBot [NC]
RewriteRule .*   - [F]
RewriteCond %{HTTP_USER_AGENT} Baiduspider+ [NC]
RewriteRule .*   - [F]
RewriteCond %{HTTP_USER_AGENT} Yahoo! [NC]
RewriteRule .*   - [F]
RewriteCond %{HTTP_USER_AGENT} Yeti [NC]
RewriteRule .*   - [F]
RewriteCond %{HTTP_USER_AGENT} KSCrawler [NC]
RewriteRule .*   - [F]
RewriteCond %{HTTP_USER_AGENT} DotBot [NC]
RewriteRule .*   - [F]
RewriteCond %{HTTP_USER_AGENT} YandexBot^ [NC]
RewriteRule .*   - [F]
RewriteCond %{HTTP_USER_AGENT} AhrefsBot [NC]
RewriteRule .*   - [F]
RewriteCond %{HTTP_USER_AGENT} ^warning [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^MJ12bot/v1.4.7 [NC]
RewriteRule ^.* - [F]

RewriteCond %{HTTP_REFERER} ^-?$ [NC]
RewriteCond %{HTTP_USER_AGENT} ^-?$ [NC]
RewriteRule .* - [F,L]

 

SetEnvIfNoCase User-Agent .*Twiceler.* bad_bot
SetEnvIfNoCase User-Agent .*trovitBot.* bad_bot
SetEnvIfNoCase User-Agent .*MJ12bot.* bad_bot
SetEnvIfNoCase User-Agent .*AhrefsBot.* bad_bot
SetEnvIfNoCase User-Agent .*VoilaBot BETA 1.2.* bad_bot
SetEnvIfNoCase User-Agent .*libwww-perl/5.805.* bad_bot
SetEnvIfNoCase User-Agent .*Java/1.5.0_11.* bad_bot
SetEnvIfNoCase User-Agent .*Sogou web spider/3.0.* bad_bot
SetEnvIfNoCase User-Agent .*psbot.* bad_bot
SetEnvIfNoCase User-Agent .*Exabot.* bad_bot
SetEnvIfNoCase   User-Agent “^BlowFish/1.0” bad_bot
SetEnvIfNoCase User-Agent “^JennyBot”   bad_bot
SetEnvIfNoCase User-Agent “^MIIxpc/4.2” bad_bot
SetEnvIfNoCase   User-Agent “^BuiltBotTough” bad_bot
SetEnvIfNoCase User-Agent   “^ProPowerBot/2.14” bad_bot
SetEnvIfNoCase User-Agent “^BackDoorBot/1.0”   bad_bot
SetEnvIfNoCase User-Agent “^toCrawl/UrlDispatcher”   bad_bot
SetEnvIfNoCase User-Agent “^WebEnhancer” bad_bot
SetEnvIfNoCase   User-Agent “^TightTwatBot” bad_bot
SetEnvIfNoCase User-Agent “^suzuran”   bad_bot
SetEnvIfNoCase User-Agent “^VCI WebViewer VCI WebViewer Win32”   bad_bot
SetEnvIfNoCase User-Agent “^VCI” bad_bot
SetEnvIfNoCase User-Agent   “^Szukacz/1.4” bad_bot
SetEnvIfNoCase User-Agent “^QueryN Metasearch”   bad_bot
SetEnvIfNoCase User-Agent “^Openfind data gathere”   bad_bot
SetEnvIfNoCase User-Agent “^Cegbfeieh” bad_bot
SetEnvIfNoCase User-Agent “^megaindex” bad_bot
SetEnvIfNoCase User-Agent “^MJ12bot/v1.4.7” bad_bot
 
 order allow,deny
 deny from env=bad_bot
 allow from all

 

Order Deny,Allow

Deny from 195.154.133.25
Deny from 176.9.10.227
Deny from 151.80.97.40
Deny from 5.9.83.211
Deny from 188.146.167.181
Deny from 151.80.97.40
Deny from 85.128.142.63
Deny from 91.121.163.73
Deny from 144.76.12.99
Deny from 178.63.19.22
Deny from 163.172.168.220
Deny from *.sentione.com
Deny from 64.79.85.205
Deny from 62.210.148.247
Deny from 69.30.210.242
Deny from 78.46.174.19


(mojeprogramy.com) #2

Tu napisałem coś więcej

http://mojeprogramy.com/jak-zabezpieczyc-strone-przed-botami

a jakbyś miał stronę na WordPressie to polecam jeszcze

http://mojeprogramy.com/blokwanie-zakresow-ip


(Tatoo) #3

oraz kilka pomocnych porad tutaj >> http://helion.pl/view/3926o/jowozr.htm