Does bind read /etc/hosts?

Reindl Harald h.reindl at thelounge.net
Wed Jul 16 03:05:10 UTC 2014


Am 16.07.2014 04:55, schrieb Mark Andrews:
> In message <53C5E714.5080307 at thelounge.net>, Reindl Harald writes:
>>> 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
>>
>> wrong tool - > dnsmasq can but on the other hand has no bind-like
>> zonefiles
> 
> Neither dnsmasq nor named read /etc/hosts.  Both can be used to
> override data from outside. They just have different configuration
> methods

surely, otherwise "--no-hosts" or the config param to disable
that would not make sense, using it with ATS in production

[root at localhost:~]$ dnsmasq --help | grep no-hosts
-h, --no-hosts Do NOT load /etc/hosts file.

-H, --addn-hosts=<file>
 Additional hosts file. Read the specified file as well as /etc/hosts.
 If -h is given, read only the specified file. This option may be
 repeated for more than one additional hosts file. If a directory
 is given, then read all the files contained in that directory.

[root at localhost:~]$ cat /etc/dnsmasq.conf
resolv-file=/etc/resolv.conf.dnsmasq
strict-order
user=nobody
group=nobody
interface=lo
no-dhcp-interface=lo
bind-interfaces
no-hosts
addn-hosts=/etc/hosts.dnsmasq
local-ttl=3600

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 246 bytes
Desc: OpenPGP digital signature
URL: <https://lists.isc.org/pipermail/bind-users/attachments/20140716/95fee9ac/attachment-0001.bin>


More information about the bind-users mailing list