Workstation reach audit
Give a workstation an audit egress policy to record the destinations it reaches, then turn the records into a strict allowlist.
Give a workstation an audit egress policy to record the destinations it reaches, then turn the
records into a strict allowlist. An audit policy enforces no destination. It sends the
workstation’s connections through an Edge, which counts each connection it lets through. Use it
when you don’t know which destinations a workstation needs.
Audit recording
A workstation records its allowed connections while its policy is audit. Its
status.egress.recorded lists allowed once recording has started. Recording stops once the
policy is no longer audit. The exception is a workstation that an administrator’s Edge records
for, as
Turn on recording of allowed connections
shows. Connection records and traffic totals
says what each record holds and how long Ringleader keeps it.
An audit workstation is recorded, and lists allowed, only once the build that serves it matches
the one your Ringleader release delivers. Until then it records nothing and does not list
allowed. Where that build is reported depends on what serves the workstation:
- Behind a cloud Edge, the edge instance reports it in
proxy.version. - Behind an edge VM for hcs, vz or qemu, the edge VM reports it to the Ringleader daemon on your computer. The answer is the same for every workstation that edge VM serves.
A workstation on hcs, vz or qemu that its own network process serves has no Edge to set records
on. It records allowed connections only when its policy is audit, and only once its network
process runs the same build as the Ringleader daemon. After you update rl, the daemon restarts
the network process on the new build once per daemon run, where it can. That briefly interrupts the
workstation’s network. Until then the workstation records nothing and does not list allowed.
A workstation that names a WorkstationConfig in spec.configs starts recording when that
WorkstationConfig’s author turns on audit. The author reads the workstation’s records only if
they own the workstation or are a namespace administrator.
Requirements for an audit policy
Ringleader checks an audit policy when you apply the workstation:
- The workstation’s provider must be GCP, AWS, Azure, hcs, vz or qemu. A new local workstation that names none runs on your computer’s Default local provider.
- On a cloud, the namespace must hold an Edge for that provider that is not being deleted. The check does not look at the region.
- An hcs, vz or qemu workstation needs no Edge.
Where Ringleader stores the workstation matters too:
- For a workstation that Ringleader stores, a cloud workstation or a node-bound local one, the apply needs no setting from whoever runs Ringleader.
- For a workstation stored only on your computer, a one-shot
rlrefusesaudituntil a daemon that supports it is running. Its message tells you to runrl daemon start. If that daemon cannot serve the workstation’s own network process, the message gives one of three fixes. Runrl daemon restartif the daemon is older than yourrl, updaterlif the daemon is newer, or declare an Edge.
Record what a workstation reaches
To turn a workstation’s connections into a strict policy, record them with audit first.
Give the workstation an audit policy, in its own
egressblock or in a WorkstationConfig it uses:spec: egress: enforcement: auditRequirements for an audit policy says which providers need an Edge for it.
Wait until the workstation says it is recording. Its
status.egress.recordedlistsallowedonce it is:rl workstation get my-box -o yamlUse the workstation the way you normally do, for as long as it takes to cover its work. A destination it does not reach in that time is missing from the next step.
Wait 10 minutes, because Ringleader stores the connections every few minutes. Then list what the workstation reached, and write the
strictpolicy those connections add up to:rl workstation egress my-box --allowed rl workstation egress my-box --suggest > egress.yaml--suggestrefuses a node-bound workstation. Write itsstrictpolicy yourself from what--allowedlists, as Lock down Claude Code for unattended runs shows.Read
egress.yamland remove what the workstation should not reach. The policy keeps the destinations the workstation already declares. It adds each destination the workstation reached that they do not cover, with names and addresses copied as recorded. Hostnames on ports other than 80 and 443 are left out, and a note on standard error counts them. To reach one of those hosts, declare its address range as acidr.Apply
egress.yamlas the workstation’segress, in place ofaudit.
rl workstation egress
lists every flag.
Next steps
- Outbound restrictions shows how to apply the policy you wrote and how to keep a workstation off your local network.
- Enforcement points says which providers
hold an
auditpolicy without an Edge. - See Edge management for declaring the Edge that records connections on a cloud.