[Dnsmasq-discuss] DNS entry without DHCP

dnsmasqyq.xpt at neverbox.com dnsmasqyq.xpt at neverbox.com
Sun Dec 9 13:50:24 GMT 2018


On Sun, Dec 9, 2018 at 1:47 AM john doe wrote:
>
> On 12/9/2018 4:26 AM, Michael wrote:
> >>
> >> Hi,
> >>
> >> If I'm using dnsmasq just as a DNS caching server, not a DHCP one,
> >> would it be possible to config some fixed IP addresses as DNS entries
> >> for my LAN?
> >>
> >> I.e., instead of changing the hosts file on every machine on my LAN
> >> with the same entries, is it possible to do such configuration
> >> centralized at dnsmasq DNS server alone?
> >>
> >
> > Yes, just add them to the /etc/hosts file on the machine running dnsmasq
> > or use the addn-hosts directive to point it to another file.
> >
>
> If the option '--hostsdir' (1) is used, there is no need to restart
> dnsmasq for changes to take effect:
>
> "--hostsdir=<path>
> Read all the hosts files contained in the directory. New or changed
> files are read automatically. See --dhcp-hostsdir for details."
>
> 1)  http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html

Brilliant! I'll go with the '--hostsdir' (1) solution. So,

What's the usual/suggested convention to put that directory?

I first thought of creating one under /etc/dnsmasq.d, then dismissed
it right away.

Any usual practices? Thx




More information about the Dnsmasq-discuss mailing list