From 5167ee91fe6e5d5fe668184386e88d9b41b8fc9c Mon Sep 17 00:00:00 2001 From: Brielle Bruns Date: Wed, 1 Jan 2020 13:46:15 -0700 Subject: [PATCH] no message --- lib/iptables.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/iptables.inc b/lib/iptables.inc index e363dbb..d44a6ae 100644 --- a/lib/iptables.inc +++ b/lib/iptables.inc @@ -493,8 +493,8 @@ function enable_nat { # 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="-i ${srcinterface}" - [[ ${srcinterface} != "-" ]] && NAT="PREROUTING" && dstinterface="-" && srcinterface="-i ${srcinterface}" + ([[ ${srcinterface} != "-" ]] && [[ ${type} != "SNAT" ]]) && NAT="PREROUTING" && dstinterface="-" && srcinterface="-i ${srcinterface}" + #[[ ${srcinterface} != "-" ]] && NAT="PREROUTING" && dstinterface="-" && srcinterface="-i ${srcinterface}" ${debug} ${DebugColor} "${FUNCNAME}:${DEFAULT_COLOR}${direction} ${action} ${srcinterface} ${srcaddress} ${srcport} ${dstinterface} ${dstaddress} ${dstport} ${protocol} ${custom}"