Skip to content

A named VM is reachable from the other VMs of its project as <name>.<project>.internal, on any TCP port. Tailscale joins a VM to your tailnet, so your other devices can reach it by name.

A private name needs no key and no open port. The connection wakes a sleeping target, and the target’s program must listen on the port you call.

  1. Open SVMs and select api.
  2. Select Terminal.
  3. Run python3 -m http.server 8080. Leave this tab open.
  4. In a second tab, open SVMs, select client, and select Terminal.
  5. Run curl http://api.default.internal:8080/.

Any TCP port from 1 to 65535 works. You open nothing first, and the target’s program must listen on the port. A private name carries TCP only, so UDP does not travel over it.

A private name has three labels: the VM name, the project name, then internal. The middle label is the project name, not its id. api.default.internal reaches the VM api in default, and api.staging.internal reaches the VM api in staging from a VM in staging.

A name resolves only from a VM of the same project, and only to a VM that has a name. A VM of another project, or of another organization, gets a connection reset. curl reports it as (52) Empty reply from server. See Isolation.

Terminal window
si exec client -- curl -sS http://api.other.internal:8080/
Output
curl: (52) Empty reply from server

A VM without a name has no private name. The project segment must be the caller’s project name, so a project id reaches nothing.

The egress block of a VM filters public HTTP and HTTPS destinations. It does not apply to private names or to traffic inside a tailnet. A private call on port 8080 works when filtering is on, even though the filter allows only ports 80 and 443 for public destinations.

When filtering is on, the VM can still reach Tailscale’s control and relay hosts under tailscale.com. Change the block in the VM’s Security tab, under Outbound access, or with PATCH /svms/{ref}. See VMs for the fields, defaults and CLI flags.

Tailscale is installed in every VM. Enabling it and logging in joins the VM to your tailnet, so your laptop and other devices reach it by its tailnet name.

  1. Open SVMs and select api.
  2. Select Terminal.
  3. Run sudo systemctl enable --now tailscaled.
  4. Run sudo tailscale up.
  5. Open the login URL that sudo tailscale up prints, and approve the node.

The login is stored on the VM’s disk, so you approve the node once.

After you approve the node, a peer on your tailnet reaches the VM by its VM id on any port. For example, curl http://6f1c0f0e8a:8080/ or ssh user@6f1c0f0e8a. The VM must be awake, so set the on sleep policy when it must stay reachable.

Tailnet traffic does not pass the secure gateway. The domain filter does not check it, and secret injection does not add a header to it. Tailscale’s own control and relay traffic does pass the gateway; with filtering on, every host under tailscale.com is allowed.

Direct connections between peers do not work from inside a VM, so tailnet traffic goes through a relay and can be slower.

These are the VM fields that set the filter. The full VM options are on VMs.

Field Type Default Allowed values What it changes
egress.filtering (--egress-filter on create) boolean false true or false Turns the outbound domain filter on.
egress.allowed_domains (--allow-domain on create) array of strings [] An exact host name, or *.domain for its subdomains The public hosts the filter permits while filtering is on.

Scroll horizontally to see all columns.

Operation Who can Key action
Open a shell in a VM Any member with a key that includes the VM’s project None
Reach a VM by name Anyone with a shell in a VM of the project None
Join a tailnet Anyone with root in the VM None
Change the outbound filter Any member svm:write

Scroll horizontally to see all columns.

  • A private name resolves only inside its project, on TCP ports 1 to 65535. UDP does not travel over a private name.
  • A VM of another project or organization gets a connection reset, which curl reports as (52) Empty reply from server.
  • A target VM must have a name. A VM without a name has no private name.
  • A private connection counts as a preview connection, so the target VM holds up to 64 at once.
  • Tailnet traffic goes through a relay, not a direct peer connection, so transfers can be slower than on a normal network.
  • A sleeping VM is not reachable through its tailnet. Set the on sleep policy to keep it reachable.

The full list is in Limits.

  • Isolation: what a VM can reach and what it cannot.
  • VMs: set the outbound filter and keep a VM awake.
  • SSH: log in from your tailnet.