Backward compatibility hack for ‘networking.nat.internalIPs’
This commit is contained in:
parent
f4329320ab
commit
8499d7555f
@ -34,6 +34,9 @@ in
|
|||||||
coming from these networks and destined for the external
|
coming from these networks and destined for the external
|
||||||
interface will be rewritten.
|
interface will be rewritten.
|
||||||
'';
|
'';
|
||||||
|
# Backward compatibility: this used to be a single range instead
|
||||||
|
# of a list.
|
||||||
|
apply = x: if isList x then x else [x];
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.nat.externalInterface = mkOption {
|
networking.nat.externalInterface = mkOption {
|
||||||
@ -78,8 +81,8 @@ in
|
|||||||
''
|
''
|
||||||
iptables -t nat -F POSTROUTING
|
iptables -t nat -F POSTROUTING
|
||||||
iptables -t nat -X
|
iptables -t nat -X
|
||||||
''
|
''
|
||||||
+ (concatMapStrings (network:
|
+ (concatMapStrings (network:
|
||||||
''
|
''
|
||||||
iptables -t nat -A POSTROUTING \
|
iptables -t nat -A POSTROUTING \
|
||||||
-s ${network} -o ${cfg.externalInterface} \
|
-s ${network} -o ${cfg.externalInterface} \
|
||||||
|
Loading…
Reference in New Issue
Block a user