Host access and loopback reach
A node-bound workstation's host access is whatever reaches your computer from outside its virtual machine, and it never leaves your computer.
A node-bound workstation’s host access is anything that reaches your computer from outside the
virtual machine, and it never leaves your computer. This page lists which fields are host access,
and whether the workstation reaches your computer’s own 127.0.0.1, which depends on its
provider. A node-bound workstation
is a local workstation whose record Ringleader keeps.
Host access that stays on your computer
These spec fields are host access:
providerConfig.mounts, and everyproviderConfigkey that names a file or a port of your computer:imageon the providers these docs cover, vz, hcs and qemu, andcommandon qemu.- An entry of
sourcesthat copies a folder from your computer (sources[].local). portsanddefaultLocalBinding, the forwards to your computer.hostAccess, which sets whether the workstation reaches your computer’s127.0.0.1, and the labels your computer selects it by. The Workstation reference lists its fields.
Write them in the workstation file as usual, and apply it on the computer that runs the
workstation. rl apply, rl edit and rl workstation create keep them on your computer and
send the rest to Ringleader. rl get on that computer shows the whole spec. On any other
device, and in the console, the spec has none of them.
A WorkstationConfig can’t supply host access to a node-bound workstation. If a WorkstationConfig
sets one of these fields, Ringleader leaves the field out. The workstation then shows a
HostAccessFromDevice condition naming the field and the WorkstationConfig. rl apply rejects
hostAccess on a WorkstationConfig outright.
Loopback reach
Whether a node-bound workstation reaches your computer’s 127.0.0.1 depends on its provider. The
table covers the providers these docs cover:
| Provider | By default | loopback: true | loopback: false |
|---|---|---|---|
| vz, hcs | No reach. | Refused. | Accepted, and changes nothing. |
| qemu | No reach. | Starts the workstation on an open network that reaches it. Refused when you set it while an egress policy or an injected credential applies to the workstation. | The default. |
| qemu, when a restricted network isn’t available for it on your computer | Reaches it. | Accepted. | Refused, because the workstation reaches it whatever the field says. |
A qemu workstation has no restricted network in two cases:
- On a computer that runs neither Linux nor macOS.
- When it was created before Ringleader could set up the network cards it needs.
Otherwise, an egress policy or an injected credential moves a running qemu workstation that has
loopback: true onto the restricted network. qemu network cards
says when it restarts, and when it returns to the open network.
A workstation that reaches your loopback, by default or through loopback: true, also reaches
your computer’s link-local addresses. When your computer is itself a cloud virtual machine, that
includes its metadata service and the cloud credentials it hands out. A DeviceReach condition
on the workstation says that it reaches your loopback, so you and the console can both see it.
Set a workstation’s host access
To set what a node-bound workstation reaches on your computer, write its host access in the workstation file. Apply the file on the computer that runs it:
apiVersion: workstations.ringleader.dev/v1
kind: Workstation
metadata:
name: my-box
namespace: team
spec:
provider: qemu
ports: [3000]
hostAccess:
loopback: false
labels:
ssh: personalHere, the workstation doesn’t reach your computer’s 127.0.0.1, and forwards port 3000 to your
computer. The SSHKey and LocalBinding resources on your computer that select ssh: personal
reach it.
Next steps
- Workstation lists the
nodeandhostAccessfields among the rest of the spec. - LocalBinding and SSHKey cover the resources on your computer that select a workstation by its host-access labels.