[Dnsmasq-discuss] Need help on configuring dnsmasq
Buck Horn
buckhorn at weibsvolk.org
Mon May 8 14:10:39 UTC 2023
On 08.05.2023 15:00:22, "public1020" wrote:
>Thanks, dnsmasq does not support this feature.
Why would you think so when you have been pointed to the correct answer
from the docs?
Matus UHLAR even quoted the decisive sentence for you:
>> it does and the answer is listed in dnsmasq manual page, just where you
>> would search for it:
>>
>> -A, --address=/<domain>[/<domain>...]/[<ipaddr>]
>>
>>
>>
>> ... Note that /etc/hosts and DHCP leases override this for individual name
'address' would specify an IP address to return for any host in the
given domains, i.e. including subdomains, so its not fit to satisfy your
original request about an individual host name, e.g. for shadowing only
example.com, but none of its subdomains.
As the docs quoted by Matus UHLAR state, you may use entries in
/etc/hosts to that purpose:
Just add some lines with the desired IP and hostname associations to
that file.
Of course, that may only work if you wouldn't prevent dnsmasq from
reading /etc/hosts.
So if your dnsmasq configuration would use the 'no-hosts' option (or if
you'd just like to keep things separated), you could configure
'addn-hosts' to point dnsmasq to a separate file with your custom host
definitions.
Kind regards,
Buck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20230508/e46715b6/attachment.htm>
More information about the Dnsmasq-discuss
mailing list