egress anti-spoofing: keep established bindings, load tables with bindings and leases in one transaction
This commit is contained in:
parent
c4ac01ef88
commit
70179b6c1f
1 changed files with 400 additions and 134 deletions
|
|
@ -197,10 +197,14 @@ pkgs.testers.runNixOSTest {
|
|||
);
|
||||
# The gateway: nginx answers on the bridge, which agents reach directly.
|
||||
networking.firewall.interfaces.eth1.allowedTCPPorts = [ 443 ];
|
||||
# hive-priv.nix links the binary the hive-egress unit runs to bind bridge
|
||||
# ports; `eth1` is no bridge here, so a stub that binds nothing stands in.
|
||||
# hive-priv.nix links the binary the hive-egress unit loads its tables with;
|
||||
# `eth1` is no bridge here, so a stub that only loads the ruleset (no
|
||||
# bindings, no leases) stands in.
|
||||
systemd.tmpfiles.rules = [
|
||||
"L+ /run/hive-rootfs-check - - - - ${pkgs.writeShellScript "hive-priv-stub" "exit 0"}"
|
||||
"L+ /run/hive-rootfs-check - - - - ${pkgs.writeShellScript "hive-priv-stub" ''
|
||||
[ "$1" = egress-load ] && exec ${pkgs.nftables}/bin/nft -f "$2"
|
||||
exit 0
|
||||
''}"
|
||||
];
|
||||
# Renders the users file the way hive-c0re does.
|
||||
environment.systemPackages = [
|
||||
|
|
|
|||
Loading…
Reference in a new issue