diff --git a/lib/iptables.inc b/lib/iptables.inc index f8ccf7b..52d8f69 100644 --- a/lib/iptables.inc +++ b/lib/iptables.inc @@ -488,7 +488,7 @@ function enable_nat { ([[ ${dstaddress} != "-" ]] && [[ ${type} == "NETMAP" ]]) && dstaddress="-d ${dstaddress}" # If we use a source interface, the rule can't go in a POSTROUTING table like what NAT is, so we punt it to PREROUTING # or it won't work. Plus we remove the destination interface too. - ([[ ${srcinterface} != "-" ]] && [[ ${type} == "NETMAP" ]]) && NAT="PREROUTING" && dstinterface="-" + ([[ ${srcinterface} != "-" ]] && [[ ${type} == "NETMAP" ]]) && NAT="PREROUTING" && dstinterface="-" && srcinterface="-i ${srcinterface}" ([[ ${custom} == "" ]] && [[ ${type} == "NETMAP" ]]) && \ ${display} RED "nat.conf: Error - NETMAP rule can not have empty custom address: ${DEFAULT_COLOR}${type} ${srcinterface} ${srcaddress} ${dstinterface} ${dstaddress} ${custom}" \ && continue