From db3500d2bc504897ab435263e3f8fa7840673378 Mon Sep 17 00:00:00 2001 From: bbruns Date: Sat, 12 Apr 2014 20:29:36 +0000 Subject: [PATCH] --- lib/iptables.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/iptables.inc b/lib/iptables.inc index 74e9878..8e1699a 100644 --- a/lib/iptables.inc +++ b/lib/iptables.inc @@ -360,6 +360,7 @@ function enable_forwarding { ([[ ${IP_VERSION} == "ipv4" ]] && [[ ${Enablev4ConnectionTracking} == "yes" ]]) && conntrack_state="${M_STATE} ${C_STATE} ESTABLISHED,RELATED" ([[ ${IP_VERSION} == "ipv6" ]] && [[ ${Enablev6ConnectionTracking} == "yes" ]]) && conntrack_state="${M_STATE} ${C_STATE} ESTABLISHED,RELATED" while read -r action srcinterface srcaddress dstinterface dstaddress bidirectional srcport dstport protocol syn; do + unset revsrcaddress revdstaddress revdstinterface revsrcinterface revsrcport revdstport [[ ${action} = \#* ]] && continue [[ -z ${action} ]] && continue ([[ ${action} != "ACCEPT" ]] && [[ ${action} != "DROP" ]]) \ @@ -410,7 +411,6 @@ function enable_forwarding { ${VER_IPTABLES} -A ${FwdFilter} ${protocol} ${srcinterface} ${srcaddress} ${srcport} ${syn} ${dstinterface} ${dstaddress} ${dstport} ${conntrack_state} -j ${action} [[ ${bidirectional} == "yes" ]] && ${VER_IPTABLES} -A ${FwdFilter} ${protocol} ${revsrcinterface} ${revsrcaddress} ${revsrcport} ${syn} ${revdstinterface} ${revdstaddress} ${revdstport} ${conntrack_state} -j ${action} done < "${FWCONFIGDIR}/ipv${IPVER}/forward.conf" - unset action srcinterface srcaddress dstinterface dstaddress bidirectional srcport dstport protocol syn ${debug} ${DebugColor} "${FUNCNAME}:${DEFAULT_COLOR} done" fi }