Repository navigation
DNS sovereignty: Firefox canary, Private Relay switch, DoT / DoH refusals (#45) - #76
Merged
Merged
Conversation
…DoH refusals Keeps LAN devices on the router's DNS, which local names, the DNS split, policy routes by domain and the proxy's fake-ip split rely on (dns.sovereignty): - firefox_canary (default on): use-application-dns.net answers NXDOMAIN. - private_relay: block answers NXDOMAIN for mask.icloud.com / mask-h2.icloud.com (default allow). - block_dot: LAN -> port 853 (TCP DoT, UDP DoQ) refused at once. - doh_blocklist_file: IPs / CIDRs of public DoH resolvers; LAN -> 443 of them refused (TCP, HTTP/3). Both dnsmasq instances answer the NXDOMAIN names. The refusals are a chain of their own (dns_guard, prerouting mangle - 1) ahead of the policy marks and the proxy's tproxy, so a resolver inside a proxied range is refused rather than tunnelled. Tests, real-packet CI (lab ruleset, lab dnsmasq), web UI card, docs/modules/dns.md. Closes #45 Claude-Session: https://claude.ai/code/session_01HWeUjo1dmS7gBkCYHrVjCr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
New
dns.sovereigntyblock:firefox_canaryuse-application-dns.net→ NXDOMAIN, so Firefox does not turn DoH on by itselfprivate_relayblock:mask.icloud.com/mask-h2.icloud.com→ NXDOMAINblock_dotdoh_blocklist_filedns_guard(prerouting, priority mangle − 1). It runs before the policy marks and the proxy's tproxy, so a resolver inside a proxied range is refused, not tunnelled. It matches only LAN-side bridges and never the router's own addresses.doh_blocklist_file: a bad line stops the render; the error names the line number but never echoes the line. It is a*_filekey, so agents and API tokens cannot set it.Why
Encrypted DNS that bypasses the router skips local names, the DNS split, policy routes by domain and the proxy's fake-ip split. ECH doesn't matter here, because the split keys on the DNS name, not the TLS SNI.
Verification
dnsmasq.confgains only the canary line.tools/ci.d/dns.sh: the lab dnsmasq, run with no upstream, answersuse-application-dns.net,mask.icloud.comandmask-h2.icloud.comwith NXDOMAIN.tools/ci.d/fw.sh, real packets through the lab ruleset:nft -cof the chain passes on a 6.18 kernel.sh tools/ci.sh: ALL CHECKS PASSED.Closes #45
https://claude.ai/code/session_01HWeUjo1dmS7gBkCYHrVjCr