forked from zentralwerk/network
nixos-module/container/upstream: add proper networking.nat.extraStopCommands
This commit is contained in:
parent
5d97e85bf6
commit
b23b687dfb
|
@ -53,7 +53,6 @@ in
|
|||
extraCommands =
|
||||
builtins.concatStringsSep "\n" (
|
||||
map (net: ''
|
||||
ip6tables -t nat -X ${net}_nat || true
|
||||
ip6tables -t nat -N ${net}_nat
|
||||
${builtins.concatStringsSep "\n" (
|
||||
map (subnet: ''
|
||||
|
@ -69,6 +68,13 @@ in
|
|||
-j ${net}_nat
|
||||
'') (builtins.attrNames upstreamInterfaces)
|
||||
);
|
||||
extraStopCommands =
|
||||
builtins.concatStringsSep "\n" (
|
||||
map (net: ''
|
||||
ip6tables -t nat -F POSTROUTING
|
||||
ip6tables -t nat -X ${net}_nat
|
||||
'') (builtins.attrNames upstreamInterfaces)
|
||||
);
|
||||
inherit (hostConf) forwardPorts;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue