Re: Please help! Pretty please? (DNS trouble, I think)

From: P.T. Breuer (ptb_at_oboe.it.uc3m.es)
Date: 01/18/04


Date: Sun, 18 Jan 2004 22:40:17 GMT

Carlos Moreno <moreno_at_mochima_dot_com@xx.xxx> wrote:
>
> I log on to the server (it's a "dedicated server" that
> we're renting from a web hoster -- it has "direct"
> connection to the net, with a static IP address), and
> type the command:
>
> $ telnet localhost 5555
>
> For about ten seconds I have no reply. Then, I get the
> expected:
>
> Trying 127.0.0.1...

Your resolver is broke. Your /etc/hosts is bust. "localhost"
must resolve immediately via /etc/hosts.

> telnet: connect to address 127.0.0.1: Connection refused

>
> (there's nothing listening on that port, and there is no
> iptables rules affecting that port either)

Nothing surprising, then.

> $ telnet 127.0.0.1 5555
>
> Then I get the expected response in zero time.

There you are - broken /etc/hosts. It's a name resolution issue.
And hosts.allow probably doesn't allow your access from your hostname,
nor does xinetd. Read logs and know more.

> The file /etc/hosts contains the following: (I changed
> the actual IP addresses and names, but other than that
> this is verbatim what the /etc/hosts file contains)
>
> --- FILE CONTENTS BEGIN ---
> # Do not remove the following line, or various programs
> # that require network functionality will fail.
> 127.0.0.1 localhost.localdomain localhost

And where is the entry for your own hostname (a FQDN)?

> 1.2.3.4 www.domain.com
> 1.2.3.5 secure.domain.com
> 1.2.3.6 mail.domain.com
> --- FILE CONTENTS END ---
>
> The file /etc/host.conf contains a single line:
>
> order hosts,bind
>
> Can you think of something that could explain this

Yes - broken /etc/hosts, hostname, etc. Even hosts.allow/deny
and xinetd.conf in combo with broken hostname, domainname, etc.

Peter



Relevant Pages

  • Re: sockets, gethostname() changing
    ... According to my book, an address is a tuple of the form (hostname, ... port), so I didn't know what you meant by using 127.0.0.1 as the ... produced an addr that contained "127.0.0.1" for the hostname. ... Got socket connection from ...
    (comp.lang.python)
  • RE: Host identification
    ... Try using AMAP and see what you are getting sometimes there are other services sitting on a known port. ... Initiating Parallel DNS resolution of 1 host. ... Scanning HOSTNAME (TARGET) ...
    (Security-Basics)
  • Re: Error message running Internet Connection wizard
    ... port 80, ssl port 443 ... Microsoft Sharepoint Administration, running, hostname is blank, ip ... I not really too familiar with IIS, so I hope this helps, thanks for your ... Skipping upnp validation ...
    (microsoft.public.windows.server.sbs)
  • Re: IP address Changes on my Network Printer
    ... How do I find out if the printer has a hostname. ... it shows the port name, driver, etc. ... occasionally when the network goes down. ... Canon IRC2880 - under the properties tab and under the ports tab - ...
    (microsoft.public.windowsxp.print_fax)
  • Re: Imap: no login... ps aux - imapd.pid -nodnslookup -noidentlookup
    ... I'm giving it a shot right now. ... works I want to post your response on the qmailrocks mailing list and ... > hostname, it will not work if you do not do that. ... > this type of setup and can only use SSL on port 993. ...
    (Debian-User)