mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 15:41:48 +00:00
firewall: clear rpfilter on stop
This commit is contained in:
parent
ea49ac0496
commit
53b24d0c95
@ -187,6 +187,12 @@ let
|
|||||||
# Clean up after added ruleset
|
# Clean up after added ruleset
|
||||||
ip46tables -D INPUT -j nixos-fw 2>/dev/null || true
|
ip46tables -D INPUT -j nixos-fw 2>/dev/null || true
|
||||||
|
|
||||||
|
${optionalString (kernelHasRPFilter && cfg.checkReversePath) ''
|
||||||
|
if ! ip46tables -D PREROUTING -t raw -m rpfilter --invert -j DROP; then
|
||||||
|
echo "<2>failed to stop rpfilter support" >&2
|
||||||
|
fi
|
||||||
|
''}
|
||||||
|
|
||||||
${cfg.extraStopCommands}
|
${cfg.extraStopCommands}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user