Skip to content

docs: state the netns-isolation boundaries (bridge IP, LAN forwarding) #91

Closed

Description

@ostermayer

Commit: 1528ecf (master, 2026-10-16). File: modules/netns-isolation.nix.

The docs don't state two properties of the netns design. Both are design choices, not bugs. A short paragraph in the netns section of docs/services.md would stop users expecting more from netns-isolation than it gives.

  1. Every service namespace accepts traffic from the bridge IP. Lines 161 and 162 put bridgeIp (169.254.<block>.10) in the INPUT accept list of each namespace. The comment says it's for the operator user, but the rule applies to any process in the main namespace: tor, i2pd, mysqld, sshd, backup jobs, and every service that isn't in a namespace. All of them can reach every service listener. Sockets still need credentials.

  2. Namespaced services can reach the LAN. Line 116 turns on net.ipv4.ip_forward. Line 145 adds a MASQUERADE rule for the whole block. The host INPUT chain limits what reaches the host on nb-br, but forwarded traffic isn't filtered. A service without tor.enforce (for example mempool or bitcoind) can connect to other hosts on the LAN, not only to the internet.

Suggested text: "netns-isolation separates services from each other and from the outside network. It doesn't separate them from processes in the host network namespace, and services without tor.enforce can reach your LAN."

Optional hardening for point 2: a FORWARD rule that drops traffic from the netns block to RFC1918 and link-local destinations, except the bridge. I can send a docs PR or the rule if you want either.

Activity

  1. added
    area: docs
    on Oct 23, 2026
  2. added
    type: security
    on Nov 6, 2026
  3. added a commit that references this issue on Nov 9, 2026
    4c3a91e
  4. added a commit that references this issue on Nov 9, 2026
    ae08a96
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

    area: docstype: security

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions