[Dnsmasq-discuss] [RFC PATCH] Add support for blocking A or AAAA queries per domain

Buck Horn buckhorn at weibsvolk.org
Wed Jan 18 21:46:14 UTC 2023


On 06.01.2023 04:33:39, Peter Tirsek wrote:

>This patch extends the `--address` option to accept two new special
>address, `!4` and `!6`, which will cause the server to block A or AAAA
>queries for the specified domain(s), respectively. This can be useful
>in situations where IPv6 connectivity is broken, but only to certain
>domains.

I may be a bit late, but somehow, naming the options '!4' and '!6' does 
not sit right with me.

If I understand correctly, your patch is about blocking specific query 
types (namely A and AAAA), rather than blocking IPv4 or IPv6.

I'd prefer to see that reflected in the option name.

Thinking along the lines of query type would also point at potential 
issues with reverse lookups (query type PTR), which -going by your 
motivation- could be required to be dealt with as well?

It may also hint at the possibility of a more generic patch, allowing to 
block other query types as well (PTR, MX, ...).

For what it's worth, you may want to take a look at how Pi-hole (which 
is based on a specialised dnsmasq fork) is tackling filtering by query 
type - see 
https://docs.pi-hole.net/regex/pi-hole/#only-match-specific-query-types

Kind regards,
     Buck

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20230118/d6633760/attachment.htm>


More information about the Dnsmasq-discuss mailing list