Re: [users@httpd] TCPwrappers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux