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