You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docs: state the netns-isolation boundaries (bridge IP, LAN forwarding) #91
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.
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.
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
docs: state what netns-isolation doesn't isolate
docs: state what netns-isolation doesn't isolate (bitcoinix#237)