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. 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: houguang...@hotmail.com > CC: bind-us...@isc.org > From: ma...@isc.org > Subject: Re: Does bind read /etc/hosts? > Date: Tue, 15 Jul 2014 20:38:12 +1000 > > > In message <bay173-w11d824e324939a1bb89852bb...@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: ma...@isc.org
_______________________________________________ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list
bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users