Re: /etc/hosts completely ignored

From: Fred Souza (fred_at_storming.org)
Date: 05/28/03

  • Next message: Daniel C. Sobral: "Re: /etc/hosts completely ignored"
    Date: Wed, 28 May 2003 14:31:10 -0300
    To: Ceri Davies <setantae@submonkey.net>, Roberto Nunnari <nunnari@die.supsi.ch>, freebsd-current <freebsd-current@freebsd.org>
    
    
    

    > Umm, host(1) looks in the DNS for hostnames, as per the manpage:
    >
    > DESCRIPTION
    > Host looks for information about Internet hosts. It gets this informa-
    > tion from a set of interconnected servers that are spread across the
    > world.
    >
    > It doesn't use /etc/hosts, just DNS. That's by design.

      I'm not sure about that. If you read all the way to end of the manpage,
      you'll see this part too:

      ENVIRONMENT
           HOSTALIASES Name of file containing (host alias, full hostname)
                               pairs.

      FILES
           /etc/resolv.conf See resolver(5).

      
      It could mean, then, that if the environment variable HOSTALIASES is
      NOT set, it'll use only DNS. But then again, you must use a dot at the
      end of the host if you don't want it to include that by itself.

      It's weird, however, that src/contrib/bind/bin/host/host.c does not
      match HOSTALIASES on a grep. Could it mean that (as usual) ISC's
      documentation makes little sense according to its source, and that
      you're right and host does not use non-DNS mechanisms at all for name
      resolution?

      Fred

    -- 
    "Chemistry professors never die, they just fail to react."
    
    



  • Next message: Daniel C. Sobral: "Re: /etc/hosts completely ignored"

    Relevant Pages

    • Re: Cant export /usr/ports
      ... > anything like this in the manpage. ... "A host may be specified only once for each local file system on the ... server and there may be only one default entry for each server file ...
      (freebsd-net)
    • Re: xterm with inverse color (black as background)
      ... If you never run xrdb to load the ... > hmm - this host has a complete set, and has no manpage for it. ...
      (comp.unix.questions)
    • Re: [Fwd: /etc/hosts and /etc/host.conf confusion]
      ... `host' is doing it's own thing. ... The manpage for host gives me ... /etc/hosts file first, then NISplus, then DNS. ... hosts: files nisplus dns ...
      (freebsd-questions)
    • Re: /etc/hosts completely ignored
      ... > Host not found. ... > reading the manpage I have no clue left.. ... it states host does the lookups using domain servers. ...
      (freebsd-current)
    • Re: Web Site Mystery
      ... host our own web site at this location. ... So in our DNS setup, there is a pointer to the ip address of the ... Run an ipconfig /all on your server and you'll see the ... www.europacrown.com don't work from our corporate network. ...
      (microsoft.public.windows.server.general)