Skip to content

Remove the clearnet switches, accept only private IP literals for remote nodes, and turn IPv6 off on the uplink #4147

Open

Description

@pithead-developer

What's the problem

The owner ruled (2026-11-16, "all as recommended") that outbound is Tor only, except XMRig stratum to a pool the owner configured. Several config switches still let the stack or the host leave Tor, and the wizard offers one of them on first boot:

  • monero.clearnet_initial_sync and tari.clearnet_initial_sync send peer traffic straight out for the whole sync. The first-boot wizard asks "Enable fast initial sync over clearnet" (lib/pithead/24-config-wizard.sh:255-264) and writes both keys on every run (:341-342), even when the answer is no. The keys are also read in 33-render-env.sh:69-70 and 34-inject-service-configs.sh:25-27, and described in 39-describe-change.sh:296,305, 06-doctor.sh:156-162 and docs/configuration.md.
  • p2pool.clearnet (28-parse-and-validate-config.sh:146, 33-render-env.sh:122, 19-small-utilities.sh:93, the dashboard approval paths in 42-control-approval-helpers.sh:79 and 42-control-policy-and-host-checks.sh:118, and the doctor text at 06-doctor.sh:179) drops P2Pool's SOCKS flags and its whole-IP firewall exemption.
  • xvb.tor=false (33-render-env.sh:130) routes XvB donation mining over clearnet. XvB is not an owner-configured pool, so it stays on Tor.
  • notifications.tor=false (33-render-env.sh:254, 39a-describe-change-notifications.sh:63) sends webhook and ntfy posts directly.
  • network.tor_egress_firewall=false (28:139, 02b-tor-egress-apply.sh:113-121) removes the container fence and is accepted on the appliance.
  • Remote Monero and Tari nodes may be hostnames. They are resolved with getent and range-checked (10-node-probe.sh, remote_node_address), which is a DNS lookup on the host and, with the firewall off, allows public addresses. 28:164,176 only checks that the value is a hostname or IP literal.
  • The uplink takes IPv6 router advertisements and DHCPv6 (os/rootfs/Dockerfile:213 sets DHCP=yes). Tor does not need it, and the egress fence covers IPv6 only when mining_net has a v6 subnet, which it does not by default.

What it impacts

  • Every appliance owner and DIY owner who set one of these keys. Defaults are unchanged: monero.clearnet_initial_sync, tari.clearnet_initial_sync and p2pool.clearnet default to false, and xvb.tor and notifications.tor default to true, so a default config keeps its current routing.
  • Owners who used p2pool.clearnet=true for yield, or xvb.tor=false, lose that option. The cost for p2pool is on record from the earlier multi-day Tor against clearnet run (docs/benchmarks/tor-vs-clearnet.md, about 10 %); no new multi-day run is made.
  • Owners of a remote node given by hostname: mining stops after the upgrade until they replace the hostname with a private IP literal. Upgrade handling must not turn this into a silent roll back of the slot.
  • Owners with a LAN webhook or ntfy target given by hostname: it will now go through Tor, which cannot reach LAN names, so they must switch to an IP literal.
  • Owners on networks that only offer IPv6 DNS or an IPv6-only uplink (not expected for a home LAN, unconfirmed).
  • Because the wizard writes the removed keys with value false on every config it creates, a config that merely contains a removed key is the normal case, not an error.

How I found it

Two research passes on 2026-11-15 and 2026-11-16: an inventory of every outbound path on both roles, and a comparison of Tor mechanisms, each checked by a second reader. I re-read the code on origin/develop for this issue and confirmed three claims: the wizard prompt and the unconditional write of both keys (24-config-wizard.sh:255-264,341-342); the hostname-or-literal validation plus getent resolution for remote nodes (28:164,176, 10-node-probe.sh); and the uplink network file (Dockerfile:213). No box was booted and no traffic was captured for this issue.

How important is it

High for 2.0.5. These are the app-level exits the rest of the plan assumes are gone before the outbound firewall is enforced (#4154 (step 9: enforce the firewall)). Nothing is exploited today and defaults are Tor-only, so it is a ruling-conformance and exposure-surface fix, not an incident. It lands after #4146 (step 2: fail-closed clients) and before #4148 (step 4: DNS through Tor).

Acceptance criteria

  • The wizard no longer asks about clearnet sync, and no new config it writes contains monero.clearnet_initial_sync, tari.clearnet_initial_sync, p2pool.clearnet, xvb.tor or notifications.tor.
  • An existing config holding a removed key at its Tor-only value (false for the three clearnet keys, true for xvb.tor and notifications.tor) loads after upgrade and the key is dropped, with one journal line saying so.
  • An existing config holding a removed key at the clearnet value fails validation with a message that names the key, says why it was removed, and says what to do instead. The message offers a LAN node or a pre-synced chain import as the sync alternative.
  • describe-change, the doctor, the dashboard settings, docs/configuration.md, docs/privacy.md and the recovery config builder carry no text for the removed keys, and the doctor no longer prints "CLEARNET initial sync" lines.
  • A rendered .env and ruleset contain no whole-IP exemption and no P2Pool clearnet flags in any config.
  • A webhook or ntfy URL whose host is a private IP literal is posted directly; every other URL goes through Tor. A unit test covers both.
  • network.tor_egress_firewall=false is rejected on the appliance and still accepted on DIY, where doctor states that only the container fence and Tor-routed commands are claimed.
  • monero.remote.host and tari.remote.host accept only private IP literals (RFC 1918, unique-local, carrier-grade NAT ranges); a hostname or a public address is rejected before any lookup, with a migration message, on appliance and DIY alike. No getent call runs for a literal.
  • An upgrade of a box whose config names a remote node by hostname boots, shows the migration message on the console and dashboard, and does not cause a slot rollback.
  • The uplink network file sets IPv6AcceptRA=no and DHCP=ipv4; a booted appliance and a booted rig show no global IPv6 address and no DHCPv6 or router-advertisement DNS or NTP.
  • Tests cover each removed key, the carve-out, the literal-only rule and the upgrade paths. docs/ states the removals and the migration steps.
  • 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), on the default config, hashrate, share counts, Monero and Tari sync rate, Tor circuit failures and dashboard error counts are within the noise band of the control arm.

Possible solutions

  • Config layer: delete the keys from the schema, the wizard, render-env, inject-service-configs, describe-change and doctor; add a one-time migration at load that drops Tor-only values and errors on the clearnet value. Keep a short removed-keys table so later releases can reuse the pattern.
  • For remote nodes, validate in 28-parse-and-validate-config.sh with the same private-range test 10-node-probe.sh already uses for resolved addresses, minus the lookup; show these nodes in the dashboard as "local network, node operator trusted".
  • Upgrade handling: validate before the slot health check, and fall back to "remote node down, message shown" instead of failing the boot. Whether this fits the health gate is not yet checked.
  • IPv6: edit the [Network] and [DHCPv4] block at Dockerfile:213 and add IPv6AcceptRA=no; Tor's ClientUseIPv6 is set explicitly in Harden the Tor container: SOCKS policy, SafeSocks, dedicated ports, no bridge control listener #4152 (step 7: Tor hardening). Whether the rig image shares this file, and whether any bench or home LAN needs IPv6 for Tor guards, is unknown and is covered by the benchmark.
  • Chain sync alternative: document pointing the node at a LAN node, and Monero's own chain import for a pre-synced copy. Whether pithead has chain import tooling today is not checked.

Sibling work: #4144 (tracker), #4148 (step 4: DNS through Tor), #4154 (step 9: enforce the firewall). Related: #4143, #4125.

Activity

  1. added this to the v2.0.5 milestone on Nov 16, 2026
  2. added
    dashboard
    security
    appliance
    operator-action
    on Nov 16, 2026
  3. added
    blocked
    on Nov 16, 2026
  4. pithead-developer commented on Nov 16, 2026

    @pithead-developer
    ContributorAuthor

    Blocked on #4146.

    Step 3 of the rollout order in #4144: it starts when step 2 closes. The operator-action hold is replaced by this dependency, so the runner releases it by itself.

  5. removed
    operator-action
    on Nov 16, 2026
  6. pithead-developer commented on Nov 20, 2026

    @pithead-developer
    ContributorAuthor

    Note from #4260 (the fail-closed HTTP helper, #4206): the helper now refuses any non-IP-literal host without a proxy, so a remote Monero node configured by hostname makes the dashboard's Monero RPC client return no data until this issue's validation rejects such a hostname. The migration message this issue adds must also cover the dashboard's remote-node state, so an owner with a hostname sees "hostname no longer allowed, use an IP literal" and not only a node-down alert. Owner ruling on #4206: no hostname carve-out in the helper.

  7. removed
    blocked
    on Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appliancedashboardsecurity

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions