diff options
Diffstat (limited to 'modules/host/default.nix')
| -rw-r--r-- | modules/host/default.nix | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/host/default.nix b/modules/host/default.nix index 7f46064..9a40f77 100644 --- a/modules/host/default.nix +++ b/modules/host/default.nix @@ -499,7 +499,7 @@ in { networking.nftables.enable = true; # The build's ruleset check runs where fcbr0-egress doesn't exist. networking.nftables.preCheckRuleset = '' - sed -i 's/skuid != "fcbr0-egress"/skuid != 0/' ruleset.conf + sed -i 's/skuid "fcbr0-egress"/skuid 0/' ruleset.conf ''; networking.nftables.tables.firecracker = { family = "inet"; @@ -587,9 +587,15 @@ ${lib.concatMapStrings (t: '' ${lib.concatMapStrings (t: " ip saddr ${t.ip} limit rate 10/second burst 50 packets log prefix \"fc-egress DENY ${t.user} ${t.name} \" level info\n") taps} reject with icmpx admin-prohibited } + # Only nginx's packets: others, including those the kernel sends on + # its own (ping replies, TCP resets, neighbour discovery; no user, so + # no skuid matches them at all), pass. chain output { type filter hook output priority filter; policy accept; - meta skuid != "fcbr0-egress" accept + meta skuid "fcbr0-egress" jump nginx + } + + chain nginx { ct state { established, related } accept # e.g. to the guests th dport 53 accept fib daddr type local reject |
