Does bind read /etc/hosts?

houguanghua houguanghua at hotmail.com
Wed Jul 16 01:43:42 UTC 2014


 Thanks a lot.
 
> To: houguanghua at hotmail.com
> CC: bind-users at isc.org
> From: marka at isc.org
> Subject: Re: Does bind read /etc/hosts?
> Date: Wed, 16 Jul 2014 11:33:00 +1000
> 
> 
> In message <BAY173-W26F0D751D9E56FFDA14B15BBF70 at phx.gbl>, houguanghua writes:
> > Sorry for what I said isn't very clear. I did know when the /etc/hosts is 
> > accessed in the OS.
> > What I want to know is whether the named access the hosts file.
> 
> 	And I gave you a clear, unequivicable "No".  Named does not
> 	read /etc/hosts.
> 
> 	Mark
> 
> > The 
> > /etc/hosts file isn't in the client's system, but in the system of Local 
> > DNS server where the 'named' task runs. For example:
> >       In the /etc/hosts file of Local DNS server(LDNS), one line exists 
> > as follows:
> >           10.10.10.1     www.google.com   
> >      A client querys this LDNS to get the IP of 'www.google.com' (the 
> > client may use dig,nslookup command. No host line is configured in 
> > /etc/hosts of this client ), what IP will be returned to the client?  Can 
> > the LDNS  return 10.10.10.1 defined in the /etc/hosts to the client?  
> > maybe some special configuration in named can support this feature.
> >  
> > Thanks,
> > Guanghua
> >  
> > > To: houguanghua at hotmail.com
> > > CC: bind-users at isc.org
> > > From: marka at isc.org
> > > Subject: Re: Does bind read /etc/hosts?
> > > Date: Tue, 15 Jul 2014 20:38:12 +1000
> > > 
> > > 
> > > In message <BAY173-W11D824E324939A1BB89852BBF60 at phx.gbl>, houguanghua 
> > writes:
> > > > Dear sir/madam,
> > > >  
> > > > Before Bind consults authority NS, does it access /etc/hosts?  In my 
> > > > testing,  it does not even seem to access /etc/hosts. But someone 
> > tells 
> > > > me Bind can access /etc/hosts first. Can you pls tell me how to 
> > config 
> > > > Bind to access /etc/hosts fist?
> > > >  
> > > > Thanks,
> > > > Guanghua
> > > 
> > > No.
> > > 
> > > getaddrinfo, gethostbyname etc. however may access /etc/hosts, NIS,
> > > mDNS, DNS and other databases.  You need to read the documentation
> > > that comes with your system for how to control these.
> > > 
> > > Mark
> > > -- 
> > > Mark Andrews, ISC
> > > 1 Seymour St., Dundas Valley, NSW 2117, Australia
> > > PHONE: +61 2 9871 4742                 INTERNET: marka at isc.org
> >  		 	   		  
> 
> -- 
> Mark Andrews, ISC
> 1 Seymour St., Dundas Valley, NSW 2117, Australia
> PHONE: +61 2 9871 4742                 INTERNET: marka at isc.org
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/bind-users/attachments/20140716/a2697332/attachment.html>


More information about the bind-users mailing list