Skip to content

stratumctl vpn

Connect this machine to a VPC over Client VPN

Terminal window
stratumctl vpn [flags]

Aliases: client-vpn, cvpn

Connect this machine to a VPC’s Client VPN endpoint with a single command — no manual WireGuard configuration.

connect generates a local keypair (private key stays on this device), downloads the tunnel config (AllowedIPs are derived from your Cedar authorization rules), and brings the interface up with wg-quick. Use --print-config to emit the.conf instead (macOS/Windows/CI).

Authorize which destinations Client VPN clients may reach

Terminal window
stratumctl vpn authorization-rules [flags]

Aliases: authz, rules

Rules are enforced server-side: a connected client with no matching rule is denied every destination.

stratumctl vpn authorization-rules authorize

Section titled “stratumctl vpn authorization-rules authorize”

Authorize a destination CIDR for Client VPN clients

Terminal window
stratumctl vpn authorization-rules authorize <endpoint-id> --target-cidr <cidr> [flags]

Aliases: create, add

Terminal window
stratumctl vpn authorization-rules authorize cvpn-4k8m2x7q9a --target-cidr 10.0.0.0/16
stratumctl vpn authorization-rules authorize cvpn-4k8m2x7q9a --target-cidr 10.0.2.0/24 --description "database subnet"
Flag Type Default Description
--description string Human-readable note
--principal string Principal the rule applies to
--principal-type string Principal kind the rule applies to (server default when unset)
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)
--target-cidr string Destination CIDR to authorize (required)

List authorization rules

Terminal window
stratumctl vpn authorization-rules list <endpoint-id> [flags]
Terminal window
stratumctl vpn authorization-rules list cvpn-4k8m2x7q9a
stratumctl vpn authorization-rules list cvpn-4k8m2x7q9a --output json
Flag Type Default Description
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

Revoke an authorization rule

Terminal window
stratumctl vpn authorization-rules revoke <endpoint-id> <rule-id> [flags]

Aliases: delete

Terminal window
stratumctl vpn authorization-rules revoke cvpn-4k8m2x7q9a cvpnau-7k2m9x4q8a
Flag Type Default Description
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

Download a Client VPN configuration for a device

Terminal window
stratumctl vpn client-config [flags]

Aliases: config

Issue a WireGuard config for a device public key

Terminal window
stratumctl vpn client-config download <endpoint-id> --public-key <base64> [flags]
Terminal window
stratumctl vpn client-config download cvpn-4k8m2x7q9a --public-key "xTIBA5rboUvnH4htodjb6e697QjLERt1NAB4mZqp8Dg=" --device-name laptop
Flag Type Default Description
--device-name string Optional label for the enrolled device
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)
--public-key string The device’s WireGuard PUBLIC key (required; the private key stays on the device)

Create, inspect and delete Client VPN endpoints

Terminal window
stratumctl vpn client-endpoints [flags]

Aliases: endpoints, endpoint

Create a Client VPN endpoint

Terminal window
stratumctl vpn client-endpoints create --vpc <vpc-id> --client-cidr <cidr> [flags]
Terminal window
stratumctl vpn client-endpoints create --vpc vpc-9k2m4x7q --client-cidr 198.18.0.0/22
stratumctl vpn client-endpoints create --vpc vpc-9k2m4x7q --client-cidr 198.18.0.0/22 --subnet subnet-3k8m2x7q --security-group sg-3f8d2k9x
Flag Type Default Description
--client-cidr string CIDR handed out to connecting clients (required)
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)
--security-group stringSlice Security group governing who may reach the endpoint’s UDP/51820. Repeatable. Requires –subnet. Without one, ingress is all-or-nothing: associating a floating IP opens the endpoint to the internet
--subnet stringSlice Tenant subnet to place an interface in. Repeatable. Must be in –vpc, and required for –security-group: a security group binds to a port, so the endpoint needs an interface of its own
--vpc string VPC the endpoint terminates into (required)

Delete a Client VPN endpoint

Terminal window
stratumctl vpn client-endpoints delete <endpoint-id> [flags]
Terminal window
stratumctl vpn client-endpoints delete cvpn-4k8m2x7q9a
Flag Type Default Description
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

Show one Client VPN endpoint

Terminal window
stratumctl vpn client-endpoints get <endpoint-id> [flags]
Terminal window
stratumctl vpn client-endpoints get cvpn-4k8m2x7q9a
stratumctl vpn client-endpoints get cvpn-4k8m2x7q9a --output json
Flag Type Default Description
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

Connect this machine to a Client VPN endpoint

Terminal window
stratumctl vpn connect <endpoint-id> [flags]
Terminal window
stratumctl vpn connect cvpn-4k8m2x7q9a
stratumctl vpn connect cvpn-4k8m2x7q9a --print-config
stratumctl vpn connect cvpn-4k8m2x7q9a --qr
Flag Type Default Description
--device-name string Label for this enrolled device (defaults to the hostname)
--print-config bool false Print the WireGuard.conf to stdout instead of bringing the tunnel up (contains your private key)
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)
--qr bool false Print the.conf as a scannable QR for the WireGuard mobile app instead of bringing the tunnel up

Tear down a Client VPN tunnel

Terminal window
stratumctl vpn disconnect <endpoint-id> [flags]
Terminal window
stratumctl vpn disconnect cvpn-4k8m2x7q9a
stratumctl vpn disconnect cvpn-4k8m2x7q9a --forget
Flag Type Default Description
--forget bool false Also revoke this device’s server-side enrollment and delete the local key
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

List Client VPN endpoints you can connect to

Terminal window
stratumctl vpn list [flags]
Terminal window
stratumctl vpn list
stratumctl vpn list --output json
Flag Type Default Description
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

Re-resolve the endpoint DNS and re-point the live tunnel (self-heal after a failover)

Terminal window
stratumctl vpn reresolve <endpoint-id> [flags]
Terminal window
stratumctl vpn reresolve cvpn-4k8m2x7q9a

Rotate the endpoint’s WireGuard server key (disconnects all clients until they re-download)

Terminal window
stratumctl vpn rotate-key <endpoint-id> [flags]
Terminal window
stratumctl vpn rotate-key cvpn-4k8m2x7q9a --yes
Flag Type Default Description
--project string project id (defaults to the configured project)
--yes bool false confirm the disruptive rotation

Manage routes pushed to Client VPN clients

Terminal window
stratumctl vpn routes [flags]

Associating a target network creates its own route automatically; add routes here for destinations beyond the associated subnet.

Add a route for Client VPN clients

Terminal window
stratumctl vpn routes create <endpoint-id> --destination <cidr> --target-subnet <subnet-id> [flags]
Terminal window
stratumctl vpn routes create cvpn-4k8m2x7q9a --destination 10.0.2.0/24 --target-subnet subnet-3k8m2x7q
Flag Type Default Description
--destination string Destination CIDR (required)
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)
--target-subnet string Subnet the traffic exits through (required)

Delete a Client VPN route

Terminal window
stratumctl vpn routes delete <endpoint-id> <route-id> [flags]
Terminal window
stratumctl vpn routes delete cvpn-4k8m2x7q9a cvpnrt-5k8m2x7q9a
Flag Type Default Description
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

List Client VPN routes

Terminal window
stratumctl vpn routes list <endpoint-id> [flags]
Terminal window
stratumctl vpn routes list cvpn-4k8m2x7q9a
stratumctl vpn routes list cvpn-4k8m2x7q9a --output json
Flag Type Default Description
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

Create a ready-to-connect Client VPN endpoint in one command

Terminal window
stratumctl vpn setup --vpc <vpc-id> [flags]

Create + fully wire a Client VPN endpoint for a VPC in one step: create the endpoint, associate a subnet, authorize ingress, wait until it’s available, and (unless –no-public) allocate + attach a floating IP so it’s dial-able. Prints the vpn connect command to run next.

Terminal window
stratumctl vpn setup --vpc vpc-9k2m4x7q
stratumctl vpn setup --vpc vpc-9k2m4x7q --subnet subnet-3k8m2x7q --authorize 10.0.0.0/16 --no-public
Flag Type Default Description
--authorize string CIDR clients may reach (default: the associated subnet’s CIDR; use the VPC CIDR for the whole VPC)
--client-cidr string 10.240.0.0/22 Address pool handed to connecting clients (must not overlap the VPC/subnets)
--no-public bool false Skip allocating + attaching a floating IP (endpoint won’t be dial-able until you associate one)
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)
--subnet string Subnet to associate (default: the VPC’s first subnet)
--vpc string VPC ID to attach the endpoint to (required)

Show local Client VPN tunnels

Terminal window
stratumctl vpn status [flags]
Terminal window
stratumctl vpn status
stratumctl vpn status --output json

stratumctl vpn target-network-associations

Section titled “stratumctl vpn target-network-associations”

Associate subnets with a Client VPN endpoint

Terminal window
stratumctl vpn target-network-associations [flags]

Aliases: associations, assoc

An endpoint with no target-network association terminates nothing — the association is what places the tunnel inside a subnet.

stratumctl vpn target-network-associations associate

Section titled “stratumctl vpn target-network-associations associate”

Associate a subnet with a Client VPN endpoint

Terminal window
stratumctl vpn target-network-associations associate <endpoint-id> --subnet <subnet-id> [flags]

Aliases: create

Terminal window
stratumctl vpn target-network-associations associate cvpn-4k8m2x7q9a --subnet subnet-3k8m2x7q
Flag Type Default Description
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)
--subnet string Subnet to associate (required)

stratumctl vpn target-network-associations disassociate

Section titled “stratumctl vpn target-network-associations disassociate”

Remove a target-network association

Terminal window
stratumctl vpn target-network-associations disassociate <endpoint-id> <association-id> [flags]

Aliases: delete

Terminal window
stratumctl vpn target-network-associations disassociate cvpn-4k8m2x7q9a cvpnas-8k2m4x7q9a
Flag Type Default Description
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

stratumctl vpn target-network-associations list

Section titled “stratumctl vpn target-network-associations list”

List a Client VPN endpoint’s target-network associations

Terminal window
stratumctl vpn target-network-associations list <endpoint-id> [flags]
Terminal window
stratumctl vpn target-network-associations list cvpn-4k8m2x7q9a
stratumctl vpn target-network-associations list cvpn-4k8m2x7q9a --output json
Flag Type Default Description
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)