networking: loose reverse-path filtering for tailscale exit nodes

Strict RPF (NixOS default) drops the encrypted return traffic of an active
exit node: table 52's 'default dev tailscale0' makes the reverse-path lookup
for packets arriving on the physical interface resolve to tailscale0, so they
are dropped before Tailscale decrypts them (rx stays 0). Loose RPF still blocks
spoofed/unroutable sources but removes the interface-match requirement, as
recommended by Tailscale/NixOS for exit nodes and subnet routers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
randogoth 2026-07-21 19:30:08 +02:00
parent b7bb444f3d
commit 1565c4cb5c

View file

@ -6,6 +6,7 @@
nftables.enable = true; nftables.enable = true;
firewall = { firewall = {
enable = true; enable = true;
checkReversePath = "loose"; # exit nodes/subnet routes need loose RPF
trustedInterfaces = [ "tailscale0" ]; trustedInterfaces = [ "tailscale0" ];
allowedUDPPorts = [ config.services.tailscale.port ]; allowedUDPPorts = [ config.services.tailscale.port ];
}; };