Re: hosts.deny: how do i test to see if hosts.deny is working





Monty loree wrote:

I am trying to block scraper sites from accessing my sites.
I have put a bunch ip addresses in my hosts.deny and I'm not sure if
they've blocked anything.


From your use of the word "sites" I'm guessing you are trying to block certain IP's from accessing your Web servers. If this is the case, then in order to use hosts.deny and hosts.allow your web server will need to be able to work with TCP Wrappers. I don't think Apache will do this (are you using Apache?). You will need to use the Limit directive in your httpd.conf file instead of hosts.deny/hosts.allow.

Then I put my own IP address into the hosts.deny to see if I could
block myself. that didn't work.

I would like to know if there is a log file or some other way to
verify that IP's that I've designated in hosts.deny are actually
getting blocked.


Yes. If it was working you would see entries in your /var/log/secure log about refused connections.

.



Relevant Pages