Fix eval and nat rules
This commit is contained in:
parent
611ac377be
commit
6a29757919
|
@ -105,14 +105,14 @@ in
|
||||||
-j DNAT --to-destination ${fwd.destination}
|
-j DNAT --to-destination ${fwd.destination}
|
||||||
|
|
||||||
iptables -t nat -A nixos-nat-post \
|
iptables -t nat -A nixos-nat-post \
|
||||||
-d ${fwd.destination} -p ${fwd.proto} \
|
-d ${lib.elemAt (builtins.match "([0-9.]+):([0-9-]+)" fwd.destination) 0} -p ${fwd.proto} \
|
||||||
--dport ${builtins.toString fwd.destination} \
|
--dport ${builtins.toString fwd.destination} \
|
||||||
-s ${config.site.net.core.subnet4} -j MASQUERADE
|
-s ${config.site.net.core.subnet4} -j MASQUERADE
|
||||||
|
|
||||||
iptables -t nat -A nixos-nat-post \
|
iptables -t nat -A nixos-nat-post \
|
||||||
-d ${fwd.destination} -p ${fwd.proto} \
|
-d ${lib.elemAt (builtins.match "([0-9.]+):([0-9-]+)" fwd.destination) 0} -p ${fwd.proto} \
|
||||||
--dport ${builtins.toString fwd.destination} \
|
--dport ${builtins.toString fwd.destination} \
|
||||||
-s ${config.site.net.c3d2.subnets4} -j MASQUERADE
|
-s ${config.site.net.c3d2.subnet4} -j MASQUERADE
|
||||||
'') config.networking.nat.forwardPorts}
|
'') config.networking.nat.forwardPorts}
|
||||||
''}
|
''}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue