/etc/hosts not working
    Michael K. Smith - Adhost 
    mksmith at adhost.com
       
    Thu Sep 11 23:22:39 UTC 2008
    
    
  
Hello David:
		_____________________________________________
		From: owner-freebsd-questions at freebsd.org [mailto:owner-freebsd-questions at freebsd.org] On Behalf Of David Naylor
		Sent: Thursday, September 11, 2008 1:49 PM
		To: freebsd-questions at freebsd.org
		Subject: /etc/hosts not working
		
		* PGP Signed: 09/11/08 at 13:49:05
		Hi,
		I am trying to redirect a URL request to a different address but it appears 
		that /etc/hosts is not doing the job.  Example:
		127.0.0.1  google.com
		The way I understand it is that by typing google.com in a web browser it 
		should result in the local page being displayed.  It instead goes to the 
		proper Google page.  
		`ping google.com' actually pings 127.0.0.1 but `host google' returns the 
		actual IP addresses for google.  
		/etc/nsswitch.conf has `hosts: files dns' and host.conf has `hosts\n dns'
		Any idea why the system calls are not honouring /etc/hosts?
		Regards
		David
		* David Naylor <naylor.b.david at gmail.com>
		* 0xFF6916B2
		
man host shows that the host utility is specifically for DNS-resolved lookups and looks at /etc/resolv.conf, not /etc/hosts
Regards,
Mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 474 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20080911/6c4bacb1/PGP.pgp
    
    
More information about the freebsd-questions
mailing list