Skip to content

feat(tailscale): reserve the Mac backend's SSH port for the agentcompute server - #21

Closed
jmgilman wants to merge 2 commits into
masterfrom
feat/mac-backend-ssh-acl
Closed

jmgilman wants to merge 2 commits into
masterfrom
feat/mac-backend-ssh-acl

Conversation

@jmgilman

Copy link
Copy Markdown
Contributor

Summary

Reserves tag:macbackend:22 for tag:agentcompute, so the agentcompute
server VM is the only tailnet node that can reach the Mac Studio over SSH.

  • New tags: tag:macbackend (the Mac Studio) and tag:agentcompute (the
    server VM, not yet built).
  • The admin rule loses its *:* wildcard and is written out with the same
    reach minus tag:macbackend:22. The host's routed LAN address
    (192.168.1.15:22) is carved out of the home range the same way, since it
    is the same sshd.
  • Tests encode both directions: the server may open :22 and nothing else on
    that host; an admin device keeps :5900, other home hosts' :22, and the
    cluster API, but loses :22 there by tag and by routed address; a sandbox
    host still reaches nothing on it.

Do not merge yet — order matters

  1. Tag the Mac Studio: tailscale up --advertise-tags=tag:macbackend on the
    host, approved in the admin console. This re-authenticates the node and
    moves it out of user ownership, so run it when a brief tailnet drop on that
    workstation is acceptable.
  2. Then merge. Merging applies the policy.

Merging first is not dangerous, just inert: tag:macbackend would match no
device while the admin rule is already enumerated.

What this does not cover

A host on the same LAN reaches 192.168.1.15:22 without Tailscale at all, so
this policy is not the boundary for local traffic. The path-independent
control is on the host: the agentcompute account has ForceCommand,
AllowTcpForwarding local, and PermitOpen 127.0.0.1:7777 in a root-owned
sshd_config.d drop-in, so that key cannot get a shell or forward anything
else from any network.

…ute server

The Mac Studio is the Phase 8 macOS backend. Its SSH port is the server's
only channel to Lume, so no other tailnet node should be able to open it.

ACL rules are allow-only, so the blanket admin rule is replaced by the same
reach written out, with tag:macbackend:22 and the routed 192.168.1.15:22
carved out. Tagging the host is what makes that expressible: a user-owned
device is reachable through autogroup:self, which cannot be narrowed per
device.

Applying this needs the device tagged first, otherwise tag:macbackend
matches nothing and the carve-out is inert while the admin rule is already
narrowed.
The host answers on en0 192.168.1.10 and en1 192.168.1.137, not the
192.168.1.15 the first draft assumed, so the routed-path SSH carve-out
covered the wrong address.
@jmgilman

Copy link
Copy Markdown
Contributor Author

Superseded by #22 at the owner’s direction. Studio remains a user device; the replacement adds only tag:agentcompute, its Studio TCP 22 access, and member HTTPS access. The invalid zero-based port ranges and macbackend retagging are not carried forward.

@jmgilman jmgilman closed this Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant