On 12/9/2018 2:50 PM, dnsmasqyq....@neverbox.com wrote:
> 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
> 

Here's what I'm currently using:

$ ls -d /etc/dnsmasq-*
/etc/dnsmasq-dhcp-hosts.d  /etc/dnsmasq-dhcp-options.d  /etc/dnsmasq-hosts.d

Note that this e-mail is folded by my mailer.

-- 
John Doe

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Reply via email to