The filter answers blocks as NXDOMAIN, NODATA, REFUSED or sinkhole, with an SOA for negative caching and Extended DNS Error 15 (Blocked) #127

Open
opened 2026-10-31 12:42:11 -04:00 by claude · 0 comments
Owner
  • Draft: PQ-21
  • Priority: medium
  • Agent: coder
  • Depends on: #126
  • Decisions: Q-PQ-6

Why

See #125.

What changes

  • DnsFilterBlockResponseModeEnum: add NoData and Refused.
  • DnsFilterEngine.BuildDeniedResponse:
    • NXDOMAIN and NODATA carry a synthesized SOA in Authority. It is owned by the queried name, with TTL and MINIMUM equal to SinkholeTimeToLiveSeconds. Rename that option's documentation to "TTL of blocked answers"; the property name stays, so existing configuration keeps working.
    • Sinkhole mode answers non-A/AAAA questions with NODATA.
    • When the request had EDNS, the reply carries EDE info-code 15 (Blocked, RFC 8914 §4.16) with no EXTRA-TEXT, in every block mode, so list names never reach clients. The pipeline keeps existing options when it adds a cookie (DnsQueryProcessingPipeline.cs:834-843) and adds an OPT only when none exists (:802). Not configurable.
  • The schedule-denial path (:710-712) uses the same builder.
  • FilteringSettingsController (src/dotnet/src/Ninlil.Web/Controllers/FilteringSettingsController.cs:64-185) and FilteringSettingsModels: accept the two new mode values.
  • ENVIRONMENT.md: the BlockResponseMode row lists the new values and the TTL row its new description (ENVIRONMENT.md:402-408). No new variable, so the totals stay.
  • README filtering walkthrough (README.md:2532-2539, :2643), including that blocked answers carry EDE 15.

Acceptance

  • Test fails first in src/dotnet/tests/Ninlil.Dns.Server.Filtering.Tests. Mode NoData for a blocked A query gives NOERROR with no answers and one SOA in Authority. With EDNS, the reply carries EDE info-code 15 and no extra text.
  • Sinkhole mode with a blocked MX query gives NODATA, not NXDOMAIN.
  • A query without EDNS gets no OPT.
  • src/dotnet/tests/Ninlil.Web.Tests PATCH accepts "blockResponseMode":"Refused".
  • Option values and API change.

Source

  • RFC 2308 §2.2, §5; RFC 8020 §2; RFC 8914 §3, §4.16.
  • Owner decision 2026-10-31 (Q-PQ-6): "Blocked (15), no text".
- **Draft:** PQ-21 - **Priority:** medium - **Agent:** coder - **Depends on:** #126 - **Decisions:** Q-PQ-6 ### Why See #125. ### What changes - `DnsFilterBlockResponseModeEnum`: add `NoData` and `Refused`. - `DnsFilterEngine.BuildDeniedResponse`: - NXDOMAIN and NODATA carry a synthesized SOA in Authority. It is owned by the queried name, with TTL and MINIMUM equal to `SinkholeTimeToLiveSeconds`. Rename that option's documentation to "TTL of blocked answers"; the property name stays, so existing configuration keeps working. - Sinkhole mode answers non-A/AAAA questions with NODATA. - When the request had EDNS, the reply carries EDE info-code 15 (Blocked, RFC 8914 §4.16) with no EXTRA-TEXT, in every block mode, so list names never reach clients. The pipeline keeps existing options when it adds a cookie (`DnsQueryProcessingPipeline.cs:834-843`) and adds an OPT only when none exists (`:802`). Not configurable. - The schedule-denial path (`:710-712`) uses the same builder. - `FilteringSettingsController` (`src/dotnet/src/Ninlil.Web/Controllers/FilteringSettingsController.cs:64-185`) and `FilteringSettingsModels`: accept the two new mode values. - ENVIRONMENT.md: the `BlockResponseMode` row lists the new values and the TTL row its new description (`ENVIRONMENT.md:402-408`). No new variable, so the totals stay. - README filtering walkthrough (`README.md:2532-2539`, `:2643`), including that blocked answers carry EDE 15. ### Acceptance - [ ] Test fails first in `src/dotnet/tests/Ninlil.Dns.Server.Filtering.Tests`. Mode `NoData` for a blocked A query gives NOERROR with no answers and one SOA in Authority. With EDNS, the reply carries EDE info-code 15 and no extra text. - [ ] Sinkhole mode with a blocked MX query gives NODATA, not NXDOMAIN. - [ ] A query without EDNS gets no OPT. - [ ] `src/dotnet/tests/Ninlil.Web.Tests` PATCH accepts `"blockResponseMode":"Refused"`. - [ ] Option values and API change. ### Source - RFC 2308 §2.2, §5; RFC 8020 §2; RFC 8914 §3, §4.16. - Owner decision 2026-10-31 (Q-PQ-6): "Blocked (15), no text".
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
lantea-one/ninlil#127
No description provided.