Re: /etc/hosts completely ignored

From: Roberto Nunnari (nunnari_at_die.supsi.ch)
Date: 05/28/03

  • Next message: Roberto Nunnari: "Re: /etc/hosts completely ignored"
    Date: Wed, 28 May 2003 19:24:06 +0200
    To: fred@storming.org
    
    

    Dear Fred,

    if I call

    -bash-2.05b# host localhost.
    localhost has address 127.0.0.1

    but that's only because the dns specified in resolv.conf
    answers the query with its own 'localhost' entry. Look:

    -bash-2.05b# host -d -t A localhost.
    ;; res_nmkquery(QUERY, localhost, IN, A)
    ;; res_send()
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64429
    ;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
    ;; localhost, type = A, class = IN
    ;; Querying server (# 1) address = 195.190.166.166
    ;; new DG socket
    ;; got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64429
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
    ;; localhost, type = A, class = IN
    localhost. 1D IN A 127.0.0.1
    rcode = 0 (Success), ancount=1
    localhost has address 127.0.0.1

    its a remote dns that answers the query.. but naturally it doesn't
    know about localhost in a not existant domain as
    localhost.noonlights.net that I use for my private network

    -bash-2.05b# host -d -t A localhost.noonlights.net.
    ;; res_nmkquery(QUERY, localhost.noonlights.net, IN, A)
    ;; res_send()
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20386
    ;; flags: rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
    ;; localhost.noonlights.net, type = A, class = IN
    ;; Querying server (# 1) address = 195.190.166.166
    ;; new DG socket
    ;; got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 20386
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
    ;; localhost.noonlights.net, type = A, class = IN
    net. 2D IN SOA a.gtld-servers.net.
    nstld.verisign-grs.com. (
                                             2003052800 ; serial
                                             30M ; refresh
                                             15M ; retry
                                             1W ; expiry
                                             1D ) ; minimum

    rcode = 3 (Non-existent domain), ancount=0
    Host not found.

    Best regards.

    -- 
                   Roberto Nunnari -software engineer-
                     mailto:nunnari@die.supsi.ch
      Scuola Universitaria Professionale della Svizzera Italiana
                Dipartimento di Informatica e Elettronica
                       http://www.die.supsi.ch
      SUPSI-DIE
      Via Cantonale                        tel: +41-91-6108561
      6928 Manno                 """       fax: +41-91-6108570
      Switzerland               (o o)
    =======================oOO==(_)==OOo========================
    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
    

  • Next message: Roberto Nunnari: "Re: /etc/hosts completely ignored"

    Relevant Pages

    • Re: An Remote Folder question
      ... "muralidharan" wrote in message ... > I tried creating an application and it worked fine in the localhost. ... > query in the application works fine. ... THere are share permissions and NTFS ...
      (microsoft.public.inetserver.asp.general)
    • Re: HELP: Debian PCMCIA DHCP configuration
      ... Jan 26 22:40:25 localhost dhclient-2.2.x: socket: Address family not ... my kernel configuration was wrong. ... set "Packet socket" to "M" under network options. ... So, rebuild kernel, rebuild pcmcia-modules, install them, reboot....all ...
      (comp.os.linux.networking)
    • Re: Mysql does not answer to Java anymore!!!
      ... > connect as 'localhost' or by other words, ... that the socket works with mysqladmin and this ... The JDBC driver can only connect via the TCP/IP socket. ... You need to ensure that your MySQL ...
      (comp.lang.java.databases)
    • Error when executing the library reference echo server example
      ... I've copy/pasted the example of the echo server that comes in the IDLE ... The only change I've made is in the host address ... Have I messed up the example putting 'localhost'? ... import socket ...
      (comp.lang.python)
    • RE: socket object, connection refused ...
      ... especially if you've done this sort of thing in other languages and localhost is used as a reference to 'self'... ... > Subject: Re: socket object, ...
      (comp.lang.python)