Cloudverg Console
PricingDocsSign in

VergShield

Writing a policy

A VergShield policy says which addresses may open connections to which others, on which ports. It is plain text, kept in versions, and compiled into nftables rules on every node.

group admins = node:laptop-ana, node:laptop-ben
allow group:admins -> * tcp/22
allow tag:web -> tag:db tcp/5432        # the app reaches its database
allow behind:chicago-hq -> node:aws-gw tcp/443
deny  * -> 10.30.9.0/24

How a rule is read

Rules are read from the top and the first one that matches a new connection decides. A connection no rule allows reaches the default: it is dropped when the policy is enforced, and only counted while it watches. Replies to an allowed connection always pass, and ping between mesh addresses always works so health checks keep running.

Selectors

WriteMeans
*Every address in the network: node addresses and approved routes
nodesEvery node's own address
node:NAMEOne node's address
tag:NAMEThe addresses of every node with that tag
behind:NAMEThe networks routed through a node, such as an office LAN
group:NAMEA group defined higher up in the policy
10.1.2.0/24A literal range or address

Where rules are enforced

The node that owns the destination decides: a node for its own address, a gateway for the networks behind it. A hub passes relayed traffic on, so each connection is judged once. What a machine sends into the mesh is never filtered at its own end.

Watch, then enforce

  1. Publish in watch mode. Nothing is blocked.
  2. Open Traffic: every flow no rule covers is listed, with a ready-made rule for it. Add the ones you want.
  3. When the list stays empty for a day, publish in enforce mode.

Simulate and blast radius

Simulate answers "would this connection be allowed" and names the rule and the node that decide it. Blast radius lists everything one node could reach if it were taken over.

API

curl -s -X POST https://api.cloudverg.com/v1/shield/networks/prod/policy \
  -H "Authorization: Bearer $VERG_API_KEY" -H "Content-Type: application/json" \
  -d '{"text":"allow tag:web -> tag:db tcp/5432\n","publish":true,"mode":"watch"}'
curl -s -X POST https://api.cloudverg.com/v1/shield/networks/prod/simulate \
  -H "Authorization: Bearer $VERG_API_KEY" -H "Content-Type: application/json" \
  -d '{"from":"web-1","to":"db-1","proto":"tcp","port":5432}'