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 =
|
extraCommands =
|
||||||
builtins.concatStringsSep "\n" (
|
builtins.concatStringsSep "\n" (
|
||||||
map (net: ''
|
map (net: ''
|
||||||
ip6tables -t nat -X ${net}_nat || true
|
|
||||||
ip6tables -t nat -N ${net}_nat
|
ip6tables -t nat -N ${net}_nat
|
||||||
${builtins.concatStringsSep "\n" (
|
${builtins.concatStringsSep "\n" (
|
||||||
map (subnet: ''
|
map (subnet: ''
|
||||||
|
@ -69,6 +68,13 @@ in
|
||||||
-j ${net}_nat
|
-j ${net}_nat
|
||||||
'') (builtins.attrNames upstreamInterfaces)
|
'') (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;
|
inherit (hostConf) forwardPorts;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue