Bots mit htaccess aussperren: Unterschied zwischen den Versionen
Aus WikiStar
| (Eine dazwischenliegende Version von einem anderen Benutzer wird nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
| − | RewriteEngine | + | RewriteEngine on |
| − | RewriteCond %{HTTP_USER_AGENT} | + | RewriteCond %{HTTP_USER_AGENT} ^Baiduspider [NC,OR] |
| − | RewriteRule ^.*$ - [F] | + | RewriteCond %{HTTP_USER_AGENT} ^Sogou [NC] |
| + | RewriteRule ^.*$ - [F] | ||
| − | + | Bing Bot Ranges: | |
| + | |||
iptables -I INPUT -s 207.46.0.0/16 -j REJECT --reject-with icmp-host-unreachable | iptables -I INPUT -s 207.46.0.0/16 -j REJECT --reject-with icmp-host-unreachable | ||
iptables -I INPUT -s 157.54.0.0/15 -j REJECT --reject-with icmp-host-unreachable | iptables -I INPUT -s 157.54.0.0/15 -j REJECT --reject-with icmp-host-unreachable | ||
| Zeile 9: | Zeile 11: | ||
iptables -I INPUT -s 157.60.0.0/16 -j REJECT --reject-with icmp-host-unreachable | iptables -I INPUT -s 157.60.0.0/16 -j REJECT --reject-with icmp-host-unreachable | ||
iptables -I INPUT -s 65.52.0.0/14 -j REJECT --reject-with icmp-host-unreachable | iptables -I INPUT -s 65.52.0.0/14 -j REJECT --reject-with icmp-host-unreachable | ||
| − | + | ||
sh ipdrop_whitelist.sh | sh ipdrop_whitelist.sh | ||
/etc/init.d/apache restart | /etc/init.d/apache restart | ||
Aktuelle Version vom 11. Februar 2015, 13:04 Uhr
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^Baiduspider [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Sogou [NC]
RewriteRule ^.*$ - [F]
Bing Bot Ranges:
iptables -I INPUT -s 207.46.0.0/16 -j REJECT --reject-with icmp-host-unreachable iptables -I INPUT -s 157.54.0.0/15 -j REJECT --reject-with icmp-host-unreachable iptables -I INPUT -s 157.56.0.0/14 -j REJECT --reject-with icmp-host-unreachable iptables -I INPUT -s 157.60.0.0/16 -j REJECT --reject-with icmp-host-unreachable iptables -I INPUT -s 65.52.0.0/14 -j REJECT --reject-with icmp-host-unreachable
sh ipdrop_whitelist.sh
/etc/init.d/apache restart