惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
美团技术团队
The Cloudflare Blog
量子位
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园_首页
F
Fortinet All Blogs
J
Java Code Geeks
人人都是产品经理
人人都是产品经理
N
Netflix TechBlog - Medium
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
爱范儿
爱范儿
Apple Machine Learning Research
Apple Machine Learning Research
B
Blog RSS Feed
博客园 - 聂微东
Hugging Face - Blog
Hugging Face - Blog
WordPress大学
WordPress大学
小众软件
小众软件
Y
Y Combinator Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Vercel News
Vercel News
S
SegmentFault 最新的问题
有赞技术团队
有赞技术团队

dnsmasq-discuss

[Dnsmasq-discuss] Announce: dnsmasq-2.92rc2 Re: [Dnsmasq-discuss] [PATCH] Fix arguments order for chaos subdomain check Re: [Dnsmasq-discuss] patch: block-file/allow-file - for review/feedback Re: [Dnsmasq-discuss] patch: block-file/allow-file - for review/feedback Re: [Dnsmasq-discuss] patch: block-file/allow-file - for review/feedback Re: [Dnsmasq-discuss] patch: block-file/allow-file - for review/feedback [Dnsmasq-discuss] patch: block-file/allow-file - for review/feedback Re: [Dnsmasq-discuss] server= with interface parameter changes behavior over time [Dnsmasq-discuss] NFTsets and hosts-files [Dnsmasq-discuss] [PATCH] Allow expired RRSIGs when stale caching is enabled [Dnsmasq-discuss] [PATCH] Fix local host records being overridden by upstream NXDOMAIN [Dnsmasq-discuss] [PATCH] Fix arguments order for chaos subdomain check Re: [Dnsmasq-discuss] Malformed RRSIG Can Crash dnsmasq [Dnsmasq-discuss] Malformed NSEC/NSEC3 Can Hang dnsmasq [Dnsmasq-discuss] Malformed RRSIG Can Crash dnsmasq [Dnsmasq-discuss] Security - IMPORTANT Re: [Dnsmasq-discuss] Issue with circuit-id matching on dhcp requests Re: [Dnsmasq-discuss] Issue with circuit-id matching on dhcp requests Re: [Dnsmasq-discuss] Issue with circuit-id matching on dhcp requests [Dnsmasq-discuss] Issue with circuit-id matching on dhcp requests Re: [Dnsmasq-discuss] [PATCH] bpf.c: fix memory leak in arp_enumerate() on BSD Re: [Dnsmasq-discuss] [PATCH] bpf.c: fix memory leak in arp_enumerate() on BSD Re: [Dnsmasq-discuss] dnssec problem here and now Re: [Dnsmasq-discuss] dnssec problem here and now [Dnsmasq-discuss] dnssec problem here and now Re: [Dnsmasq-discuss] server= with interface parameter changes behavior over time Re: [Dnsmasq-discuss] [PATCH] bpf.c: fix memory leak in arp_enumerate() on BSD Re: [Dnsmasq-discuss] [PATCH] bpf.c: fix memory leak in arp_enumerate() on BSD Re: [Dnsmasq-discuss] [PATCH] Preserve existing log file permissions when adding group-write bit. [Dnsmasq-discuss] server= with interface parameter changes behavior over time
Re: [Dnsmasq-discuss] Potential privacy issue: filter-rr ...
Simon Kelley · 2026-03-18 · via dnsmasq-discuss
There's a reason it's done this way.

Unless you do the upstream query, you can't, in general, know if the answer should be NODATA or NXDOMAIN.

Guessing wrong NXDOMAIN is really bad; you'll lose answers for other RRtypes.

Guessing wrong NODATA isn't so bad, you might make unnecessary queries for other RRtypes. It's also lying to downstream, and that might come back to bite you in unexpected ways.


Cheers,

Simon.


On 27.02.2026 02:44, [email protected] wrote:
I'm using the following configuration with dnsmasq to drop specific
types of DNS requests:

filter-rr=NS,MX,TXT,HTTPS,PTR

However, I have noticed that dnsmasq still sends these requests to the
upstream DNS server before filtering them out.
For example:

dnsmasq[830633]: query[TXT] nsa.gov from 127.0.0.1
dnsmasq[830633]: forwarded nsa.gov to 127.0.0.1#5353 <--
dnsmasq[830633]: config nsa.gov is NODATA
dnsmasq[830633]: config nsa.gov is NODATA
dnsmasq[830633]: query[HTTPS] nsa.gov from 127.0.0.1
dnsmasq[830633]: forwarded nsa.gov to 127.0.0.1#5353 <--
dnsmasq[830633]: reply nsa.gov is NODATA


The lines that state "forwarded" indicate that dnsmasq is querying the
upstream DNS server despite already knowing that the answer will
ultimately be dropped.
This behavior contradicts your documentation, which states: "Remove
records of the specified type(s) from answers."

Thus my Proposal:

If the query type is already listed in `filter-rr`, I suggest that
dnsmasq should do:
- Drop the request immediately without forwarding.
- Provide an immediate response stating like "config nsa.gov is NODATA."

This change would enhance efficiency by eliminating unnecessary queries
to the upstream server
as well as preventing unnecessary leaks to adversary.

Thank you for considering this suggestion.

_______________________________________________
Dnsmasq-discuss mailing list
[email protected]
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss



_______________________________________________
Dnsmasq-discuss mailing list
[email protected]
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss