Full Byte Developer.

Tailscale for agent machines

Install Tailscale on the agent host, join the tailnet, tighten ACLs, then pair T3 or SSH without opening public ports.

Published here , updated · 7 sources

Agent machines should not sit on open SSH ports for convenience. Tailscale puts the host on a private WireGuard tailnet so laptops, phones, and GPU boxes can reach each other without publishing the agent to the public internet [1][2]. T3 Code documents LAN and tailnet pairing after both devices join [5].

Install Tailscale on the agent host

Tailscale's Linux download page documents a one-line installer [1]:

bash
curl -fsSL https://tailscale.com/install.sh | sh

Warning: review the script before piping to sh, or use the distro package steps on the same download page [1].

Bring the node up (CLI docs cover tailscale up and related commands) [2]:

bash
sudo tailscale up
sudo tailscale status

After the browser auth flow finishes, tailscale status should list the host with a Tailscale IP in the 100.x CGNAT range [2]. Enable MagicDNS if you want stable names inside the tailnet instead of memorizing those addresses [4].

This draft host does not have the Tailscale binary installed, so the capture below is the expected failure when you check before install:

bash
command -v tailscale || echo "tailscale not installed"
text
tailscale not installed

Run the install steps on the agent box itself, then re-check tailscale status there [1][2].

See the private path as a diagram

laptop / phone tailnet peer Tailscale mesh WireGuard + ACLs MagicDNS names agent host 100.x address Skip public port-forward. Keep Claude Code deny rules on the host anyway [3][7]. Reachability is not authorization for .env files.

The mesh answers who can dial the box. Permission rules on the agent still decide which files tools may read.

Tighten who can reach the agent host

ACL docs describe policy that controls which devices and users can talk on the tailnet [3]. Prefer tags for agent boxes (for example a production tag) and grant only your laptop user or group access to SSH or the T3 port. Do not leave "allow all" if the host holds cloud keys [3].

Controls that matter together:

  1. Install and join: install.sh plus tailscale up [1][2].
  2. Name lookup: MagicDNS for stable hostnames [4].
  3. Who can connect: ACLs and tags [3].
  4. Agent UI remote: T3 LAN and Tailscale routes [5].
  5. Secrets on disk: Claude Code deny rules still required [7].

Pair an agent UI over the tailnet

For T3 Code, remote-access docs say t3 up --lan (or the LAN choice in t3 up) is the LAN/private-network pairing path, with a pairing code as the gate for devices on those networks [5]. It is not Tailscale itself. After both devices join the same tailnet, T3 can learn Tailscale routes and the docs cover Tailscale HTTPS as a separate step [5]. Follow that doc for the exact Settings clicks on the day you install [5].

bash
t3 up --lan

Expect a pairing link or QR for a phone or second desktop on the same tailnet. Keep the host awake; remote docs require the machine to stay running and reachable [5]. For terminal choices around agent work, see Terminals for agent work. For trying T3 itself, see Try T3 Code.

Keep Claude Code permissions separate

Tailscale only answers "who can reach the box." Claude Code still needs deny rules for .env and a check before merge. Pair this page with env lock and terminals for agent work [6][7].

A common failure mode is opening SSH on 0.0.0.0 "just for the weekend" while Tailscale is already installed. You then have two paths: the private one you meant, and a public one scanners find. Prefer listening on the Tailscale interface or binding SSH to the 100.x address, then confirm with ss or tailscale status that the public NIC is not advertising the same port [2][3].

Operate day to day

Check membership after sleep or VPN changes with tailscale status. If a node shows offline, wake the machine or re-run tailscale up before you dig into agent UI bugs [2]. MagicDNS names fail when MagicDNS is disabled in the admin console; fall back to the 100.x address while you fix the setting [4].

When a contractor needs temporary access, add their device or user through ACLs with an expiry rather than sharing your laptop's SSH key [3]. Revoke the tag grant the same day the contract ends. Network access revocation is faster than rotating every secret the agent ever touched, but you should still rotate cloud keys if the host was fully exposed.

SSH over the tailnet still uses normal user keys. Generate and install those with the SSH keys for developers flow, then point a Host alias at the MagicDNS name so scripts stay short (SSH config).

Mistakes that reopen the public internet

Port-forwarding the agent host "temporarily" after Tailscale already works. Scanners do not respect temporary [3].

Leaving ACLs as allow-all because the first t3 up pairing felt hard. Tags and least privilege are the product feature you bought [3].

Treating Tailscale as a substitute for .env deny rules. Reachability and tool permissions are different layers [7].

Binding SSH only to 0.0.0.0 and hoping another firewall layer saves you. Prefer the tailnet address and verify listeners [2].

Skipping MagicDNS then hard-coding stale 100.x addresses into phone shortcuts after a node rebuild [4].

Sharing one auth account across three laptops so you cannot revoke a single lost device cleanly [3].

Exit nodes and subnets (keep narrow)

Tailscale can advertise exit nodes and subnet routes. Those features widen reach beyond a single agent host. For coding agents, start with node-to-node access only. Advertise a subnet only when a runbook says the agent must reach a private database network, and put that grant behind tags with expiry [3]. An exit node that routes all laptop traffic through a GPU box is a different threat model than "SSH to the agent."

Subnet routes also tempt people to skip ACLs ("everyone on the office LAN can hit the agent"). Keep the ACL table explicit even when routes exist [3].

Logging and break-glass

Keep a short break-glass note: how to get console access if Tailscale auth fails (cloud provider serial console, physical keyboard, or out-of-band IPMI). Without that note, a bad ACL edit locks you out of the only path you use to fix ACLs. Test the break-glass path once after you tighten policy [2][3].

Pair SSH identities with SSH keys for developers and Host aliases from SSH config so scripts call ssh agent-box instead of a raw 100.x address that changes after a reinstall.

What you have now

A private path to an agent host without opening the coding box to the public internet, plus a reminder that Claude Code deny rules still apply on disk [5][7]. Install, join, tighten ACLs, then pair the UI. Related terminal choices live on Terminals for agent work. When you raise clients to v1.106 for hybrid ML-KEM-768, use Tailscale v1.106 hybrid ML-KEM-768.

Browse the Dev tools topic.

Send this to the friend who was about to port forward a GPU box for Claude Code.

Dark metallic cube with an orange center port surrounded by six interlocking teal rings with orange accents, cyan arrowed paths carrying small shapes inward on a dark grid floor.
The agent host sits on a private mesh; peers reach it through the tailnet instead of a public port forward.

Keep this guide

By Full Byte Developer

Filed under Dev tools, Security

Questions about this guide

Why Tailscale for agents?

It gives a private WireGuard network (your tailnet) so laptops, phones, and GPU boxes can reach each other without port-forwarding the agent host to the public internet.

Does T3 Code support Tailscale?

Yes. After both devices join the same tailnet, T3 can learn Tailscale routes and documents Tailscale HTTPS. t3 up --lan is the LAN/private-network pairing path, not Tailscale itself.

Is Tailscale a substitute for deny rules?

No. Network reachability is separate from Claude Code permission rules. Keep env locks and deny rules on the host.

Where is the product compare with WireGuard and OpenVPN?

Not in this page. This page is the agent-host setup from Tailscale and T3 primary docs.

What IP range do Tailscale nodes use?

Tailscale assigns addresses in the 100.x CGNAT range on the tailnet; confirm with tailscale status after authentication.

Sources

Next in this stack