Check for NAT being enabled first before adding NAT table
This commit is contained in:
		
							parent
							
								
									4c5333bfd6
								
							
						
					
					
						commit
						e6f471a3b6
					
				| @ -111,7 +111,8 @@ function setup_iptables_chains { | |||||||
| 	${VER_IPTABLES} -A FORWARD -j ${FwdFilter} | 	${VER_IPTABLES} -A FORWARD -j ${FwdFilter} | ||||||
| 	if [ -x ${FWCONFIGDIR}/ipv${IPVER}/custom/nat.sh ]; then . ${FWCONFIGDIR}/ipv${IPVER}/custom/nat.sh; fi | 	if [ -x ${FWCONFIGDIR}/ipv${IPVER}/custom/nat.sh ]; then . ${FWCONFIGDIR}/ipv${IPVER}/custom/nat.sh; fi | ||||||
| 	${debug} ${DebugColor} "${FUNCNAME}:${DEFAULT_COLOR} Setting up NAT" | 	${debug} ${DebugColor} "${FUNCNAME}:${DEFAULT_COLOR} Setting up NAT" | ||||||
| 	${VER_IPTABLES} -A POSTROUTING -t nat -j ${NAT} | 	([[ ${IP_VERSION} == "4" ]] && [[ ${Enablev4NAT} == "yes" ]]) && ${VER_IPTABLES} -A POSTROUTING -t nat -j ${NAT} | ||||||
|  | 	([[ ${IP_VERSION} == "6" ]] && [[ ${Enablev6NAT} == "yes" ]]) && ${VER_IPTABLES} -A POSTROUTING -t nat -j ${NAT} | ||||||
| 	if [ -x ${FWCONFIGDIR}/ipv${IPVER}/custom/portfw.sh ]; then . ${FWCONFIGDIR}/ipv${IPVER}/custom/portfw.sh; fi | 	if [ -x ${FWCONFIGDIR}/ipv${IPVER}/custom/portfw.sh ]; then . ${FWCONFIGDIR}/ipv${IPVER}/custom/portfw.sh; fi | ||||||
| 	${debug} ${DebugColor} "${FUNCNAME}:${DEFAULT_COLOR} Setting up PortForward" | 	${debug} ${DebugColor} "${FUNCNAME}:${DEFAULT_COLOR} Setting up PortForward" | ||||||
| 	${VER_IPTABLES} -A PREROUTING -t nat -j ${PortForward} | 	${VER_IPTABLES} -A PREROUTING -t nat -j ${PortForward} | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user