master
parent
e80ab69b82
commit
db3500d2bc
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue