aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md21
1 files changed, 12 insertions, 9 deletions
diff --git a/README.md b/README.md
index 69ee20c..d5fb323 100644
--- a/README.md
+++ b/README.md
@@ -20,17 +20,19 @@ In the host's NixOS configuration:
```nix
imports = [
- (import /path/to/firecracker/modules/host { user = "tv"; })
+ (import /path/to/firecracker/modules/host { users = { tv = 8; alice = 2; }; })
];
```
-This sets up a bridge `fcbr0` (172.16.0.1/24) with tap devices for the
-given user, DHCP and DNS for the guests, the egress proxy, and nftables
-rules that keep the guests from reaching anything else, on the host or
-beyond. It needs `networking.nftables` (and enables it).
+`users` says who may run VMs, and how many at the same time: each gets
+that many tap devices. This sets up a bridge `fcbr0` (172.16.0.1/24)
+with the taps, DHCP and DNS for the guests, the egress proxy, and
+nftables rules that keep the guests from reaching anything else, on the
+host, beyond, or each other. Each tap has a fixed address, and the bridge
+drops anything a guest sends from another, so the proxy knows whose a
+connection is. It needs `networking.nftables` (and enables it).
-Optional arguments: `taps` (default 8, the number of VMs that can run at
-the same time) and `proxyPort` (default 10443, where the proxy listens;
+Optional argument: `proxyPort` (default 10443, where the proxy listens;
the guests' port 443 gets redirected there).
If the host has a firewall of its own, it has to let the guests in on
@@ -73,8 +75,9 @@ nix-build pkgs/run-firecracker-vm \
## Egress
The guests resolve every name to the host, and all their HTTPS goes to
-the proxy, which decides by the server name and the rules in
-`/var/lib/fc-egress/allowed`. The user manages these with `fc-egress`:
+the proxy, which decides by the server name and the rules of the guest's
+user, in `/var/lib/fc-egress/USER/allowed`. Each user manages their own
+with `fc-egress`:
```sh
fc-egress list