From e46fdf98a18c76503dcf17d0cf44fcbdd07337b4 Mon Sep 17 00:00:00 2001 From: Brielle Bruns Date: Wed, 1 Jan 2020 13:44:57 -0700 Subject: [PATCH] no message --- lib/iptables.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/iptables.inc b/lib/iptables.inc index e4deab7..e363dbb 100644 --- a/lib/iptables.inc +++ b/lib/iptables.inc @@ -469,7 +469,7 @@ function enable_nat { #[[ ${srcaddress} != "-" ]] && revsrcaddress="-d ${srcaddress}" #[[ ${dstinterface} != "-" ]] && revdstinterface="-i ${dstinterface}" #[[ ${srcinterface} != "-" ]] && revsrcinterface="-o ${srcinterface}" - [[ ${srcinterface} != "-" ]] && srcinterface="-i ${srcinterface}" + #[[ ${srcinterface} != "-" ]] && srcinterface="-i ${srcinterface}" [[ ${dstinterface} != "-" ]] && dstinterface="-o ${dstinterface}" [[ ${srcaddress} != "-" ]] && srcaddress="-s ${srcaddress}" @@ -493,6 +493,7 @@ 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}"