We enforce per-box egress allowlists with eBPF programs in the kernel, so the policy
applies to the box's traffic regardless of what the code inside tries.
It is off by default, and observe-only until you arm
it. Out of the box you get the attempts recorded, not blocked. Arming takes
both a daemon-wide switch and a per-agent opt-in, on a Linux backend:
# daemon-wide enforcer
CONTAINARIUM_NETWORK_POLICY_BPF_OBJECT=/path/to/netpolicy.bpf.o
CONTAINARIUM_NETWORK_POLICY_ENFORCE=1
# per-agent enforcement + the egress it legitimately needs
CONTAINARIUM_AGENT_NETWORK_POLICY_ENFORCE=1
CONTAINARIUM_AGENT_EGRESS_CIDRS=<daemon-api>/32,<dns>/32
That last line is the trap. Arm enforcement
without listing the platform egress the agent actually needs — the daemon API and DNS —
and you'll strand it: a peer-only allowlist means it can't resolve a hostname or call
home to the daemon, and you get a confusing hang rather than a clean denial. Budget a
round of "observe the flows, then write the allowlist" before you switch it on.
Observe-first is deliberate — a default-deny that nobody validated against real traffic
gets switched off in a hurry the first time it breaks a build, and then you have neither
enforcement nor the habit of it.