Skip to content

Guest and Telework resolve public DNS only, through a second Blocky instance

This design gives the Guest leg (VLAN 3100) and the Telework leg (VLAN 3200) the answers that public DNS gives, for every name, fzymgc.house included. A second Blocky instance on the resolver pair serves those two legs. It holds no internal configuration, so it cannot return an internal answer. Sean agreed the design on 2026-09-25. It closes issue #2302. No implementation plan exists yet.

Today a Guest or Telework client gets NXDOMAIN for every name under fzymgc.house and both reverse zones. That includes the public names id.fzymgc.house and cluster-docs.docs.fzymgc.house. After this change, the same client gets the same answer that a phone on a cellular network gets.

Query from Guest or Telework Today After
id.fzymgc.house NXDOMAIN The public Cloudflare answer
dns-health.fzymgc.house (internal only) NXDOMAIN NOERROR with no records. The public zone has wildcard MX records for *.fzymgc.house, so every name under it exists publicly.
example.com The public answer The public answer
PTR for a 192.168.0.0/16 address NXDOMAIN NXDOMAIN, answered locally by the special-use table of Blocky

Trusted legs, the tailnet and the keepalived health client see no change.

The Accepted ADR docs/adr/2026-08-28-blocky-per-client-view-withholds-the-whole-apex.md gives every untrusted client the default client group of Blocky. That group carries the internal-namespace denylist. The implementation of this design writes a new ADR that supersedes the old one for Guest and Telework, and sets the status of the old ADR to Superseded.

The old ADR rejected a per-leg allowlist, and that rejection still holds. In one Blocky instance, only blocking.clientGroupsBlock is per-client. The customDNS and conditional blocks are global. An allowlisted name therefore continues down the chain to conditional.mapping, and PowerDNS returns the internal address. Fence rule 57 (Guest) and fence rule 49 (Telework) block that address. The client gets a correct-looking answer and a connection that times out.

This design does not allowlist names. It takes the internal answer source out of the path for the untrusted legs.

3.1 Two Blocky instances on each resolver node

Section titled “3.1 Two Blocky instances on each resolver node”

Each node of the pair (sandiego, portland) runs two Blocky processes from the one binary.

Main instance (blocky) Public instance (blocky-public)
Serves Trusted legs, the tailnet, the health client Guest and Telework
Listeners dns_vlan_interfaces | selectattr('trusted'): address, VIP, address6, VIP6 dns_vlan_interfaces | rejectattr('trusted'): address, VIP, address6, VIP6
Health listener 127.0.0.1:53 127.0.0.3:53
conditional to PowerDNS Yes No
customDNS Yes No
blocking internal-namespace denylist, per-client groups No blocking section
Upstream Control D over DoT The same Control D endpoint over DoT
HTTP (metrics) 127.0.0.1:4000 127.0.0.1:4001

The trusted attribute on each dns_vlan_interfaces entry stays the only place that declares trust. It now also selects which instance listens on a leg. Every entry must declare the key. An entry without it fails the render, so nothing converges until the leg is classified.

Both instances bind port 53 on different addresses, with ports.freeBind: true. No address appears in both listener lists. The public instance also uses a loopback address of its own, so the health check for each instance reaches that instance only. 127.0.0.2:53 is the dnscrypt-proxy fallback stub on these nodes, so the public instance uses 127.0.0.3. The address and the check name are declared once in group_vars/dns_hosts.yml for both roles.

The public instance turns on Blocky’s rebinding protection. Blocky drops any upstream answer that carries a private, ULA, loopback or link-local address. An internal address cannot reach these legs, even if the public zone or the Control D profile points inward.

3.2 The public instance has its own template

Section titled “3.2 The public instance has its own template”

The public instance uses a new, short template, blocky-public-config.yml.j2. It does not add conditionals to the 300-line main template. A reader can make sure that the file has no conditional, customDNS or blocking key by reading it. A second unit file, blocky-public.service, runs the same binary with the new configuration file. It carries the same hardening and the same absence of ExecReload= as blocky.service.

The public instance keeps these parts of the main configuration:

  • The DoT upstream pair, with the same tcp-tls: form and the same TLS name pin.
  • The rateLimit block, with the same per-address caps. Its allowlist holds 127.0.0.1, the source address of every query from the node, including the health check.
  • The caching block. A public answer is safe to cache, because every client of this instance gets the same view.
  • The special-use domain handling, which is on by default. It answers every name under invalid. NXDOMAIN locally, with no upstream query, and section 3.4 depends on that. The public instance has no customDNS, so whoami.dns.invalid gets NXDOMAIN here, not an address.

The Firewalla rule FW_PREROUTING_DNS_DEFAULT sends every routed udp/53 query from Guest and Telework to the Firewalla itself. A client that uses the leg VIP it got from DHCP or RDNSS does not meet this rule, because the VIP is on-link. A client with a hand-set resolver meets it. The Firewalla dnsmasq for each of these legs reads its own resolv file, not the WAN file that the trusted legs share.

Those files are ~/.router/config/dnsmasq/bond0.3100.resolv.conf and bond0.3200.resolv.conf. A read on 2026-09-25 found nameserver 192.168.79.5 and nameserver 192.168.217.5, the leg VIPs. So a caught query reaches the public instance, and the client still gets public DNS.

VI_guest and VI_telework are not members of the dns_vips sync group. The group takes the trusted legs only, so that an unauthenticated VRRP advert from an untrusted segment cannot move the trusted VIPs. This design keeps that. Before this change the two instances had no tracker.

Each of the two instances gets its own track_script { chk_public_answer }. Sean ruled this on 2026-09-25. A failure of the public instance on the VIP holder moves only those two VIPs to the peer. The trusted VIPs and dns_vips do not change.

The check asks the public instance at 127.0.0.3 for health.dns.invalid and requires NXDOMAIN. Blocky answers that name from its special-use table, with no upstream query. The check fails only when the public instance does not run or does not answer. An outage of the internet link, Control D or PowerDNS does not fail it. A check that resolves a public name fails on both nodes during such an outage, and then neither node holds the two VIPs.

  • The main instance keeps its internal-namespace denylist and its deny-by-absence default. After this change, no untrusted leg reaches the main instance through a listener. The denylist stays as the fall-through for a source that the configuration does not name.
  • The node nftables rules already accept 53 on the Guest and Telework interfaces. They do not change.
  • The tailnet exemption, the Firewalla forwarding exemption and the rate-limit rules of the main instance do not change.

Each reading must come from a host on that leg. A reading from any other host is routed, meets the Firewalla DNAT, and measures the Firewalla. The Firewalla also intercepts plaintext queries to public resolvers, so the public reference is DNS over HTTPS (DoH). The decoy is an address outside the DHCP pool (.20 to .249). If it answers, the other readings did not measure the pair.

Guest, IPv4, from a host with an address in 192.168.79.0/24:

Terminal window
dig @192.168.79.5 id.fzymgc.house A +short | sort
curl -s -H 'accept: application/dns-json' \
'https://cloudflare-dns.com/dns-query?name=id.fzymgc.house&type=A' # want: the same addresses
dig @192.168.79.5 dns-health.fzymgc.house A +short # want: no output, never a 192.168. address
dig @192.168.79.250 id.fzymgc.house +time=2 +tries=1 # decoy: want a timeout

Repeat the block for AAAA, for the Guest IPv6 VIP fddb:f665:73f7:2::5, and for Telework at 192.168.217.5 and fddb:f665:73f7:5::5.

On each resolver node:

Terminal window
sudo ss -ulnp | rg ':53 ' # want: each untrusted address owned by the blocky-public PID
dig @127.0.0.3 health.dns.invalid +noall +comments | rg 'status: NXDOMAIN' # want: one match
dig @127.0.0.1 dns-health.fzymgc.house +short # want: the internal answer (main is unchanged)
  1. Split blocky_listen_addresses into the trusted and untrusted derivations in ansible/roles/blocky/defaults/main.yml.
  2. Add blocky-public-config.yml.j2, blocky-public.service and the tasks that render, enable and restart them. Restart one node at a time.
  3. Add chk_public_answer and its script to ansible/roles/keepalived/, and add the tracker to VI_guest and VI_telework.
  4. Ship the blocky-public journal through the DNS collector.
  5. Write the new ADR, set the 2026-08-28 ADR to Superseded, and add the row to the ADR index.
  6. Update docs/operations/dns.md: the resolver table rows for Guest and Telework, the client view section, and the Blocky listener check.
  7. Take the readings in section 4 and record them in the pull request.