Make sure src interface is added
parent
01fe8d5ec6
commit
d0208b0006
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue