Re: /etc/hosts completely ignored

From: Daniel C. Sobral (dcs_at_tcoip.com.br)
Date: 05/28/03

  • Next message: dave: "Re: policy on GPL'd drivers?"
    Date: Wed, 28 May 2003 14:42:45 -0300
    To: Roberto Nunnari <nunnari@die.supsi.ch>
    
    

    AFAIK, hosts is a DNS tool, exclusively.

    Roberto Nunnari wrote:
    > Hello.
    >
    > Sorry to post again even though I've been told I should post
    > to -questions.. but I believe this is a bug.
    >
    > Here is some more info on my configuration:
    > (I rebuilt the kernel but this behaviour was present in GENERIC, too)
    >
    > -bash-2.05b# uname -a
    > FreeBSD jupiter.noonlights.net 5.0-RELEASE FreeBSD 5.0-RELEASE #0: Wed
    > May 28 11:50:07 CEST 2003
    > root@jupiter.noonlights.net:/usr/src/sys/i386/compile/JUPITER01 i386
    >
    > -bash-2.05b# cat /etc/rc.conf
    > keymap="swissgerman.iso.acc"
    > moused_enable="YES"
    > saver="warp"
    > defaultrouter="192.168.1.1"
    > hostname="jupiter.noonlights.net"
    > ifconfig_rl0="inet 192.168.1.5 netmask 255.255.255.0"
    > sendmail_enable="YES"
    > sshd_enable="YES"
    > linux_enable="YES"
    >
    >
    > -bash-2.05b# cat /etc/hosts
    > 127.0.0.1 localhost.noonlights.net localhost
    > 192.168.1.5 jupiter.noonlights.net jupiter
    > 192.168.1.5 jupiter.noonlights.net.
    > 193.5.56.6 www.freebsd.org myfreebsd
    >
    > note the wrong IP for www.freebsd.org!! just for testing purposes!
    >
    > -bash-2.05b# cat /etc/nsswitch.conf
    > hosts: files dns
    >
    >
    > -bash-2.05b# cat /etc/host.conf
    > hosts
    > bind
    >
    >
    > -bash-2.05b# cat /etc/resolv.conf
    > domain noonlights.net
    > nameserver 195.190.166.166
    > nameserver 195.190.166.167
    >
    > -bash-2.05b# host localhost
    > Host not found.
    >
    > -bash-2.05b# host localhost.noonlights.net
    > Host not found.
    >
    > -bash-2.05b# nslookup localhost
    > Server: ns1.ticino.com
    > Address: 195.190.166.166
    >
    > Non-authoritative answer:
    > Name: localhost
    > Address: 127.0.0.1
    >
    >
    > -bash-2.05b# host jupiter.noonlights.net
    > Host not found.
    >
    >
    > -bash-2.05b# hostname
    > jupiter.noonlights.net
    >
    >
    > -bash-2.05b# host www.freebsd.org
    > www.freebsd.org has address 216.136.204.117
    > www.freebsd.org mail is handled (pri=10) by mx1.freebsd.org
    >
    >
    > See? /etc/hosts is completely ignored..
    >
    > If I missed something, I'd be grateful if somebody could
    > let me know... for I'm new to /etc/nsswitch.conf.. but after
    > reading the manpage I have no clue left.. just an idea that
    > is a bug..
    >
    >
    > Thank you.
    >

    -- 
    Daniel C. Sobral                   (8-DCS)
    Gerencia de Operacoes
    Divisao de Comunicacao de Dados
    Coordenacao de Seguranca
    VIVO Centro Oeste Norte
    Fones: 55-61-313-7654/Cel: 55-61-9618-0904
    E-mail: Daniel.Capo@tco.net.br
             Daniel.Sobral@tcoip.com.br
             dcs@tcoip.com.br
    Outros:
    	dcs@newsguy.com
    	dcs@freebsd.org
    	capo@notorious.bsdconspiracy.net
    He who hates vices hates mankind.
    _______________________________________________
    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: dave: "Re: policy on GPL'd drivers?"

    Relevant Pages

    • Re: DNS lookup for a system on the same subnet
      ... after the first server ... it queries the second DNS ... Did you clear the ARP caches of all the hosts before "testing"? ... nameserver 24.204.0.4 ...
      (comp.os.linux.networking)
    • slow name resolution in Mandrake 8.2, any ideas whats wrong?
      ... While browsing the web usually see "resolving host: ... nameserver 4.2.2.2 ... name resolution performance for hosts outside of my local network. ... Once again my windows machines have no problems resolving either local ...
      (comp.os.linux.networking)
    • Search Engine Hijack (qhosts?), HijackThis.log.
      ... Trojan Qhosts hijacks the HOSTS file, ... run the Beta "Hijack This" utility which detects the HOSTS ... F6BBB4EA6601}: NameServer = 85.255.113.206,85.255.112.153 ...
      (microsoft.public.windows.inetexplorer.ie6.browser)
    • Re: Locally-defined host names wont resolve
      ... per nameserver. ... Didn't seem necessary for me to restart the network for hosts changes to ... full hog and installed a local DNS server. ...
      (linux.redhat)
    • Re: Locally-defined host names wont resolve
      ... per nameserver. ... Didn't seem necessary for me to restart the network for hosts changes to ... full hog and installed a local DNS server. ...
      (alt.os.linux.redhat)