Use a script to pull in host blocks and add some robot blocks from

the live server.
This commit is contained in:
Tom Hughes 2009-12-15 22:39:51 +00:00
parent 614fef3c13
commit 6b24ce4de9
2 changed files with 19 additions and 3 deletions

View file

@ -0,0 +1,9 @@
#!/bin/sh
if [ -d /etc/firewall ]
then
for ip in $(ls /etc/firewall)
do
echo "\$HTTP[\"remoteip\"] == \"$ip\" { url.access-deny = (\"\") }"
done
fi

View file

@ -39,10 +39,17 @@ $HTTP["remoteip"] == "128.40.168.98" {
}
#
# IP blocked at SteveC's request as it was trying to download the
# history of every object in the database one at a time
# Pull in host blocks
#
$HTTP["remoteip"] == "143.210.16.160" { url.access-deny = ("") }
include_shell "lighttpd-host-blocks.sh"
#
# Block some troublesome robots
#
$HTTP["useragent"] =~ "msnbot" { url.access-deny = ("") }
$HTTP["useragent"] =~ "Twiceler" { url.access-deny = ("") }
$HTTP["useragent"] =~ "Baiduspider" { url.access-deny = ("") }
$HTTP["useragent"] =~ "Sosospider+" { url.access-deny = ("") }
#
# Rule to block tilesAtHome when somebody decides to queue vast