-
Notifications
You must be signed in to change notification settings - Fork 914
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request:" Return SOA record in AUTHORITY SECTION when sending dnsdist generated NXDOMAIN #4747
Comments
I can see the same behaviour with an empty response without errors. For example with
It would be great to get there a SOA record in the response as well 😃 |
I'm not sure that setting AUTHORITY is the right thing to do here on these responses. If these are internally-generated responses, then they are by default non-authoritative. At the least, I'd say this should be a configuration flag setting. Also, we use NXDOMAIN to reply to blocked queries. We would not want to look up or synthesize SOA for every zone in which a block is generated; that seems un-necessary. Also, what is the problem this patch is trying to solve? |
I wasn't really solving an operational problem, I ran into dig output that looked odd, discussed a bit with @Habbie and back then we agreed it looked "weird" and might deserve an issue here. I agree that if we still want this (internally generated responses) it should be configurable. |
I built an ad blocking solution with dnsdist and would like dnsdist to return a SOA record telling me that the query has been blocked. Something like this:
Is there currently any way to set the authority section of the answer when using a LuaAction? |
Wisdom from https://tools.ietf.org/html/draft-vixie-dnsop-dns-rpz-00:
|
Habbie: So is the assertion that changing the SOA on RPZ or RPZ-like responses a desirable thing to do? I'm not clear on if your comments are in support of a Lua method to change SOA, or against it, or indicates desired change action associated with your comment as it relates to the ticket. |
I read this to mean: touching AUTHORITY isn't desirable, but there is precedent for adding a SOA in ADDITIONAL. |
Zeha: Adding the SOA doesn't seem to be a problem if it's optional, and customizable with a LuaAction. I can see how that would be useful. |
It was a data point; apparently putting a SOA in RPZ-based denials is what the RPZ spec wants.
I totally skimmed over 'additional' there. Now I wonder what existing RPZ implementations do! |
I haven't tested it with BIND but it looks like it uses the ADDITIONAL section for the SOA. See the dig output here: https://abuse.ch/blog/using-urlhaus-as-response-policy-zone-rpz/ |
So let's say we want to generate an answer from dnsdist with a |
I have always assumed that this feature would involve the admin making these decisions consciously, with very little magic in dnsdist. I note that in Knot Resolver, users are expected to type in such things in Lua strings as DNS wireformat, in fact. |
That makes sense from |
in RPZ, the generated SOA is not a valid SOA for the response - it is only a debugging tool for finding out on whose authority (no pun intended) the block/change happened. |
Short description
When generating a NXDOMAIN response (with RCodeAction(3)) with dnsdist, it might be nice to also supply a SOA record in the AUTHORITY section of the response.
Steps to reproduce
dnsdist -l 127.0.0.1:5354 -a 127.0.0.0/8
> addAction(RegexRule(".dnsdist.org"), RCodeAction(3))
% dig nxdomain.dnsdist.org @127.0.0.1 -p 5354
Expected behaviour
Getting a response with
AUTHORITY: 1
and aSOA
record in theAUTHORITY
section.Actual behaviour
> addAction(RegexRule(".dnsdist.org"), RCodeAction(3))
Other information
Usecase
Getting a response that's more like a "real" authoritative nameserver.
Description
Fill the
AUTHORITY
section on generatedNXDOMAIN
responses.The text was updated successfully, but these errors were encountered: