Dynamic blocking based on query attributes (qname/domain) instead of only client IP #17619
ffabretti19
started this conversation in
Ideas
Replies: 1 comment
|
Per-domain dynamic blocking already exists, see |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
🧩 Description
Hello,
First of all, thanks for the great work on dnsdist — dynblocks are extremely useful and work very well in production environments.
I would like to understand if there are any plans (or ongoing discussions) about extending dynamic blocking capabilities beyond the current client IP–based model, to support query-based criteria such as qname (domain).
From what I understand:
DynBlockRulesGroup()evaluates traffic using ring buffersThis works very well for typical abuse scenarios, but has limitations in environments with:
🚧 Limitation
In our use case, we often see:
In this scenario:
👉 Blocking per IP is too coarse-grained
👉 Blocking per domain would be much more effective and safer
Also, as noted by maintainers, dnsdist does not have strong domain-awareness (zone cuts etc.), which makes this non-trivial.
💡 Suggested enhancement
Would it make sense to extend dynblocks to optionally support query-based keys, instead of only client IP?
Some possible approaches:
Option 1 — Composite key
Allow dynamic blocks keyed by:
(client IP + qname)(qname)onlyOption 2 — Query-scoped enforcement
Related to this existing request:
👉 #13671
Instead of blocking all traffic from an IP:
For example:
Option 3 — New rule types
Introduce new functions like:
setQNameRate(...)exceedQNameRate(...)🎯 Use cases
This would help in cases like:
❓ Question
Is this something that is being considered for future versions of dnsdist?
If not, would you see this as aligned with the design goals of dynblocks, or out of scope?
All reactions