httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Noah <s...@onastick.net>
Subject Re: [users@httpd] TCPwrappers
Date Sun, 20 Mar 2005 22:18:50 GMT
On Mon, Mar 21, 2005 at 08:16:10AM +1200, Bruce Kingsbury wrote:
 
> On a semirelated note; I use this little cron job in an (fairly 
> pointless and unsucessful) attempt to block address harvesters 
> identified by the honeynet poject
> 
>  echo "" > html/.htaccess
> 
>  lynx --source http://www.projecthoneypot.org/bots_and_servers.php \
>    | grep bnone | sed -es"/<\/a>//" -es"/.*>/deny from /" >> html/.htaccess

<random>

This could be better written as:

lynx --source http://www.projecthoneypot.org/bots_and_servers.php \
    | grep bnone | sed -es"/<\/a>//" -es"/.*>/deny from /" >> html/.htaccess.tmp

(insert some code to sanity-check the result of the fetch here)

cp html/.htaccess html/.htaccess-prev
mv html/.htaccess.tmp html/.htaccess

This ensures that:
    a) your current config is backed up
    b) network timeouts to projecthoneypot.org don't leave you exposed
    for $SOME_NUM seconds

</random>

--n

--
<huey> dd of=/dev/fd0 if=/dev/flippy bs=1024
<huey> ^^^ Making Flippy Floppy


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message