diff options
| author | tv <tv@krebsco.de> | 2026-11-17 02:28:41 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-17 02:28:41 +0000 |
| commit | d6c5c010f3764e2a7bc7c6b654ef7986d704199b (patch) | |
| tree | 80fb6fb6f51618e2f81a150db2eb1cef998b9e21 /layers/switch.nix | |
| parent | b050c6af6aedbe78201addb4abe2636ab075d14e (diff) | |
per-VM egress whitelists
Whitelists are now named, any number per user, in
/var/lib/fc-egress/USER/LIST, and each VM uses one of them:
run-firecracker-vm --egress LIST (default: default). The run script
writes the list's name to /run/fc-egress/TAP when it takes the tap, and
empties it when the VM exits; a list that doesn't exist allows nothing.
A user's VMs can only use that user's lists.
So the unit of policy is the tap (i.e. the running VM) rather than the
user: nftables sets allow_TAP, nginx decrypt sockets decrypt-TAP.sock,
egress_taps.lua maps guest addresses to tap and user. fcbr0-firewall
updates a tap when its file in /run/fc-egress changes, and all of a
user's taps when anything in the user's directory does. nginx's
connection limit stays per user.
fc-egress takes -l LIST (default: default), and has new commands lists
and vms (running VMs' taps and their lists). Log lines now say user,
tap and (nginx's) list: "ALLOW|DENY USER TAP LIST ...", kernel:
"fc-egress ALLOW|DENY USER TAP".
The old rules file, /var/lib/fc-egress/USER/allowed, is now just a list
named "allowed"; rename it to "default" to keep using it.
Diffstat (limited to 'layers/switch.nix')
0 files changed, 0 insertions, 0 deletions
