Filter AAAA at Pi-hole on hosts without IPv6 egress (v0.1.94) #14
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
symphony
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
backmeupplz/myground!14
Loading…
Reference in a new issue
No description provided.
Delete branch "myg-fix-exit-node-ipv6-aaaa"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The Tailscale exit node advertises a
::/0route. On a host whose upstream provides no IPv6 (e.g. behind an ISP gateway that doesn't delegate a v6 prefix — confirmed on the production box, which only has a WireGuard ULAfd08::and no v6 default route), that route is a black hole:::/0is advertised, the client tunnels the IPv6 connection to the exit node.Fix
Break the chain at DNS. When the host has no IPv6 egress, set Pi-hole's
filter-AAAAso clients only ever receive IPv4 and never attempt the dead path. Validated live against the production Pi-hole (filter-AAAA→ AAAA returns empty, A still resolves).stats::host_has_ipv6_egress()— zero-packet UDP route probe (same technique asget_server_ip). Treats link-local (fe80::/10) / ULA (fc00::/7) only hosts as having no egress.apps/pihole.yml— newFTLCONF_misc_dnsmasq_lines: "${PIHOLE_DNSMASQ_LINES}".apps.rs::build_merged_env— fills that var withfilter-AAAAwhen there's no egress, empty otherwise.Conditional & self-healing: re-evaluated on every compose render, so dual-stack installs are unaffected and the filter clears automatically if real IPv6 egress later appears.
Tests
stats::global_unicast_v6_classificationcovers global / loopback / unspecified / link-local / ULA.paperlesstest fails identically on master — environmental/tmpstorage guard, unrelated).🤖 Generated with Claude Code