Repository navigation
Description
What's the problem
The owner ruled (2026-11-16) that outbound is Tor only and there is no plaintext DNS on the box. Today names resolve through the LAN router or the ISP:
- The uplink network file (
os/rootfs/Dockerfile:213) takes DNS from DHCP and setsMulticastDNS=yes;systemd-resolvedalso keeps its compiled-in fallback servers and LLMNR. - Tor has no
DNSPort(build/tor/torrc.template); its only listeners areSocksPort 0.0.0.0:9050and the twoControlPortlines. - Containers resolve through the host. Only Tari has its own
dns:entry (docker-compose.yml:269) pointing at a dead address. - The host resolves operator-supplied names with
getent(14-local-miner.sh:318,42-control-policy-and-host-checks.sh:231,10-node-probe.sh).
What it impacts
Every host and container lookup on both roles. A name typed by the owner (pool, node, webhook) is visible to the LAN resolver and the ISP today. After the change, lookups fail until Tor is up, so callers must retry; mining and the dashboard must not depend on a lookup during the first minutes of boot. Rigs get the same resolver config in the shared image and use their own Tor client for it (see Possible solutions). Owners who run a LAN resolver for other names lose it on the box.
How I found it
The 2026-11-15 and 2026-11-16 egress inventory and the Tor mechanism comparison, with a second reader on each. I re-read Dockerfile:213, torrc.template (no DNSPort) and docker-compose.yml:259-269 (Tari's dns:) on origin/develop. Behaviour of resolved, podman and Tor DNSPort was not tested; those are listed as unknowns.
How important is it
High for 2.0.5. DNS is the most common way a Tor-only box leaks a name. It is needed before the outbound firewall can drop port 53 (#4154 (step 9: enforce the firewall)) and it follows #4147 (step 3: remove clearnet switches), which removes most operator-name lookups.
Acceptance criteria
- Tor runs a
DNSPorton the Tor container's bridge address, port 53, for containers, and on loopback for the host. Containers get a composedns:entry for it. systemd-resolvedhas that DNSPort as its only upstream,Domains=~., an emptyFallbackDNS=,LLMNR=no, andMulticastDNS=noso avahi alone answers.local. The uplink network file setsUseDNS=noin[DHCPv4],[DHCPv6]and[IPv6AcceptRA].pithead.localstill resolves from a LAN client and from the box itself.- Before Tor is ready, a lookup of a public name fails fast and never leaves the box; after bootstrap it succeeds. A capture on the guest uplink shows no port 53 or 853 traffic, and none on the bridge except to the Tor container, across first boot, reboot and one hour of mining.
- A container run with a public name returns the Tor answer, and a container probe for a LAN resolver gets nothing.
getentis not used for operator-supplied names: literals are used as given; pool and node names that remain are resolved at the proxy (socks5h).- Tests cover the rendered config, the pre-Tor failure and a negative probe from host and container.
- Through [benchmark] Stability and mining impact of Tor-only egress #4155 (benchmark) (hours per arm, at most 24 h per run, no multi-day soak): lookup success rate and latency (median and 95th percentile) over a fixed query set, boot-to-first-lookup time, boot-to-mining time, hashrate and share counts. Mining and dashboard behaviour is within the noise band of the control arm, and any dashboard errors from failed lookups are counted.
Possible solutions
- Tor: add
DNSPorton the bridge address and loopback; binding port 53 needs a capability ornet.ipv4.ip_unprivileged_port_start, or an nft redirect (unknown which works in the image). resolved cannot name a non-53 port viaresolv.conf, which is why containers need port 53 on the bridge; the host can point at a loopback port. - DNSPort is UDP only and answers A, AAAA and PTR. Tor rejects
.local, so avahi keeps mDNS. Skip a DoH or TCP stub, which adds a third-party resolver. - Unknowns to test first: whether podman honours compose
dns:through its socket and whether container-name resolution survives it; how resolved reacts to Tor's refusals (NOTIMP or REFUSED); whether the Tor container can bind port 53; how the host reaches the Tor container on loopback today. - Rigs: the rig Tor client in Rig Tor client: persistent state, runs as debian-tor, control socket, shared by updates, time and probes #4151 (step 6: rig Tor client) provides the DNSPort. Until then the rig behaviour with Tor off (no lookups, stratum resolved at the proxy by XMRig socks5) must be confirmed.
Sibling work: #4144 (tracker), #4147 (step 3: remove clearnet switches), #4149 (step 5: time through Tor), #4154 (step 9: enforce the firewall).
Activity
pithead-developer commentedon Nov 16, 2026
Blocked on #4147.
Step 4 of the rollout order in #4144: it starts when step 3 closes, together with step 5 and the rig Tor client (#4151).
pithead-developer commentedon Nov 22, 2026
Tari's "Timeout fetching DNS checkpoints" line (every 2 minutes) belongs with this issue's decision, deferred from #4159 / #4047 by the owner ruling: do not disable the checkpoint fetch in the log-hygiene PR (#4356), because it is a reorg safeguard, and decide it here once names resolve through Tor. Please add to the acceptance criteria: the line either disappears because checkpoints resolve through Tor, or the fetch is disabled deliberately with the decision recorded in
docs/operations.md("Warnings that appear in a healthy service log").