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

This is a discussion on hosts.deny: how do i test to see if hosts.deny is working - Setup ; 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. Then I put my own IP address into the hosts.deny to ...

+ Reply to Thread
Results 1 to 4 of 4

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

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

    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.

    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.

    Many thanks.


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

    I should have mentioned that the format of hosts.deny file is this:
    ALL: 65.95.68.87
    ALL: 66.249.66.37
    ALL: 216.94.11.42
    ALL: 72.14.199.20
    ALL: 65.95.71.128
    ALL: 65.214.44.29
    ALL: 216.221.90.213
    ALL: 64.180.179.132
    ALL: 66.249.66.210
    ALL: 65.95.68.115
    ALL: 72.14.194.26
    ALL: 216.232.222.59
    ALL: 64.180.172.3
    ALL: 206.47.136.100
    ALL: 65.95.69.159
    ALL: 65.95.71.120
    ALL: 65.95.68.112
    ALL: 65.95.69.85
    ALL: 66.249.66.205
    ALL: 86.34.4.118
    ALL: 84.19.188.27
    ALL: 195.225.177.131

    format of my hosts.allow is this:
    #
    # hosts.allow This file describes the names of the hosts which are
    # allowed to use the local INET services, as decided
    # by the '/usr/sbin/tcpd' server.
    #



    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.
    >
    > 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.
    >
    > Many thanks.



  3. 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.


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

    Steve Cousins wrote:
    >
    >
    > 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.


    Why not use iptables and protect all your server programs?

    Or if you want to use hosts.deny, why not have hosts.deny deny everything
    and use hosts.allow to selectively allow those sites you wish to hear from?
    That way if you overlook something, you are (over)protected.
    >
    >> 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.
    >



    --
    .~. Jean-David Beyer Registered Linux User 85642.
    /V\ PGP-Key: 9A2FC99A Registered Machine 241939.
    /( )\ Shrewsbury, New Jersey http://counter.li.org
    ^^-^^ 12:15:01 up 38 days, 14:45, 3 users, load average: 4.17, 4.26, 4.13

+ Reply to Thread