Skip to content

Outbound HTTPS works by default through the secure gateway. Inbound traffic reaches a VM only through its web addresses, port forwards, SSH and your tailnet.

The VM sets HTTP and HTTPS settings for outbound traffic. Tools such as curl and package managers use them. Keep those settings when a program starts a subprocess or when you configure a tool.

Terminal window
si exec -- curl -I https://example.com

A successful HTTPS connection does not give your request any credentials for the destination. Your application sends its own provider keys or account tokens. Keep those keys separate from the SlashInfra key, which authenticates requests to SlashInfra only.

By default the firewall allows ports 80 and 443. Domain filtering is off by default and may be on for your service. The current policy is in limits.

When domain filtering is on, the host must match the allowlist, and allowing a host does not allow all its ports. The Tailscale control and relay hosts are allowed in that case, as covered in private network. The domain filter does not apply to traffic inside a Tailscale tunnel.

The firewall refuses a destination written as an IP address. It also checks the address that a name resolves to, so a correct name can still fail when it resolves to a restricted address. A client that ignores the outbound settings gets no direct route to the internet.

A web address has the form https://<port>-<id>.slashinfra.dev. The secure gateway checks access and sends the request to that port inside the VM. Start the server before you open the address. The address does not start a listener. See web addresses for the access levels.

Your laptop can reach a closed port through a port forward. This command listens on 127.0.0.1 on your laptop and tunnels to the VM:

Terminal window
si port forward 3000 8000 5432:15432

A forward works on a closed port and wakes the VM on the first connection. It counts toward the VM’s connection limit, and it closes when you stop the command.

Every VM runs an SSH server on port 22. Once the VM has joined your tailnet, a tailnet peer connects to it by name, without a port forward.

Tailnet traffic reaches the VM through a Tailscale relay. Direct peer connections do not work from inside the VM, so transfers can be slower than on a normal network.

A VM with a name is reachable from the other VMs of its project as <name>.<project>.internal, on any TCP port. A VM without a name has no private name.

Terminal window
curl http://api.default.internal:8080/

Neither VM needs a key, and the target does not need an open port. Connecting wakes a sleeping target. A name in another project, a name in another organization, or a name that matches no VM ends the connection without an answer. curl reports (52) Empty reply from server, not 403 or 404.

The bytes you receive count toward your VM’s network usage, not the target’s. The connection keeps both VMs awake while data moves.

Open connections always end when a VM sleeps or stops. Browser apps, WebSockets, SSH sessions and database clients must reconnect. Their next request wakes the VM. See sleep and wake for what a resumed process keeps.

A preview, an SSH session or a port forward keeps the VM awake while it moves data. A connection that carries only keep-alives does not. A preview connection closes after about 100 seconds without traffic, so send WebSocket pings or server-sent event comments to keep a long-lived one open.

A tunnel daemon inside the VM does not keep it awake, and a sleeping VM is not reachable through its own tunnel. A web address wakes it, and so does si svm start.

To keep SSH from your tailnet reachable at any time, set the on policy. The VM then never sleeps, and it uses its memory all the time:

Terminal window
VM=my-vm
si svm sleep "$VM" on

Set auto again when the VM should sleep when idle.