The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Host.deny Warning

Discussion in 'Security' started by inthukha, Aug 20, 2013.

  1. inthukha

    inthukha Well-Known Member

    Joined:
    Jul 17, 2013
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hello,

    I noticed the logs generating in /var/log/messages

    Code:
    Aug 21 01:09:51 server1 ting for c: warning: /etc/hosts.deny, line 11: missing newline or line too long
    in host.deny file

    Code:
    # hosts.deny	This file contains access rules which are used to
    #		deny connections to network services that either use
    #		the tcp_wrappers library or that have been
    #		started through a tcp_wrappers-enabled xinetd.
    #
    #		The rules in this file can also be set up in
    #		/etc/hosts.allow with a 'deny' option instead.
    #
    #		See 'man 5 hosts_options' and 'man 5 hosts_access'
    #		for information on rule syntax.
    #		See 'man tcpd' for information on tcp_wrappers
    in.telnetd : ALL : severity emerg
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,775
    Likes Received:
    663
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,146
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Just try to add "telnet: ALL" this and check if this works for you.
     
  4. inthukha

    inthukha Well-Known Member

    Joined:
    Jul 17, 2013
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator

    Yes, but i don't have telnet service enable or even installed. i just putt this by following security tips. should i remove this ?

    - - - Updated - - -

    Thanks for the reply. i will try this and will let you know.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,775
    Likes Received:
    663
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I recommend removing the entry completely. If you want to disable telnet on your server, you can remove it via:

    Code:
    yum remove telnet
    Thank you.
     
  6. inthukha

    inthukha Well-Known Member

    Joined:
    Jul 17, 2013
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hello Michael,

    I removed the entry from the host.deny file but i can still see the warning message. only thing changed is line 11 to 10.

    httpd/network services restarted but not solve.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,775
    Likes Received:
    663
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Was the file manually edited in a text editor from another platform (e.g. Windows)? You may want to remove the contents of this file completely and replace it with the default entry. EX:

    Code:
    #
    # hosts.deny	This file describes the names of the hosts which are
    #		*not* allowed to use the local INET services, as decided
    #		by the '/usr/sbin/tcpd' server.
    #
    Thank you.
     
  8. inthukha

    inthukha Well-Known Member

    Joined:
    Jul 17, 2013
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hi,

    I have the following default

    Code:
    # hosts.deny	This file contains access rules which are used to
    #		deny connections to network services that either use
    #		the tcp_wrappers library or that have been
    #		started through a tcp_wrappers-enabled xinetd.
    #
    #		The rules in this file can also be set up in
    #		/etc/hosts.allow with a 'deny' option instead.
    #
    #		See 'man 5 hosts_options' and 'man 5 hosts_access'
    #		for information on rule syntax.
    #		See 'man tcpd' for information on tcp_wrappers
    upon replacing with your provided its showing:

    Code:
    Sep  1 22:24:26 server1 ting for c: warning: /etc/hosts.deny, line 4: missing newline or line too long

    Okay, finally remove all of he content from /etc/hosts.deny file solve the issue. this should be blank file. i use centos 6.4
     
Loading...

Share This Page