hosts.deny and hosts.allow problem

Discussion in 'Linux Networking' started by dan, Jun 14, 2005.

  1. dan

    dan Guest

    Hi. I'm having trouble setting up my hosts.allow and hosts.deny files.
    Basically I only want to be able to ssh in from one particular ip
    address, e.g. xxx.xxx.xxx.xxx.

    When my setup is:

    # cat /etc/hosts.deny
    ALL: ALL

    # cat /etc/hosts.allow

    I _cannot_ ssh in, as expected.



    When it is:

    # cat /etc/hosts.deny

    # cat /etc/hosts.allow

    I _can_ ssh in, as expected


    But when it is:

    # cat /etc/hosts.deny
    ALL: ALL

    # cat /etc/hosts.allow
    sshd: xxx.xxx.xxx.xxx

    I cannot ssh in.... I can't even get in when I do:

    # cat /etc/hosts.allow
    sshd: ALL

    So it seems like hosts.deny works as I would anticipate, but
    hosts.allow doesn't seem to be overuling hosts.deny.

    Anyone have any clue? This is Redhat 9

    Thanks in advance....

    Dan
     
    dan, Jun 14, 2005
    #1
    1. Advertisements

  2. Strange... I have this identical setup, and it works fine. Maybe RH9
    has a switch that determines whether hosts.allow overrules hosts.deny.
    Or, maybe you have a syntax error (stray control character?) that
    prevents hosts.allow from being parsed correctly. ??
     
    Andrew Schulman, Jun 14, 2005
    #2
    1. Advertisements

  3. dan

    Bit Twister Guest

    bad ip address, or no carriage return after it. :)
     
    Bit Twister, Jun 14, 2005
    #3
  4. dan

    dan Guest

    Thanks much.....it was the missing carriage return.....:)
     
    dan, Jun 15, 2005
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.