[Dnsmasq-discuss] dnsmasq's behaviour with configured static hosts is unintuitive

Aaron Jones me at aaronmdjones.net
Thu Mar 4 06:50:39 UTC 2021


Hello.

I'm trying to force queries for specific names to not be forwarded along
to recursors, and be answered locally. The normal way to do this is to
put such address/name pairs in hosts(5), or you can add a --host-record=
option to the configuration file.

That works okay.

However, I'm trying to force a specific address family. Specifically,
these records are for host names on a VPN, and the VPN is IPv6 only. So,
for example, given the following configuration option:

--host-record=foo.example.org,fd00::1

Or given the following hosts(5) entry:

fd00::1 foo.example.org

... will result in an AAAA query for the name returning fd00::1, but an
A query is forwarded along to the configured recursors, instead of
dnsmasq replying with NODATA.

This seems wrong.

I tried to explicitly indicate that there is no IPv4 address, but this
option has no effect:

--host-record=foo.example.org,,fd00::1

... and this option returns the address exactly as given:

--host-record=foo.example.org,0.0.0.0,fd00::1

Any pointers?

Regards,
Aaron Jones

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20210304/809de4fc/attachment.sig>


More information about the Dnsmasq-discuss mailing list