Push out 0.9.11
parent
1b246529b0
commit
76a4f33cda
|
@ -513,15 +513,17 @@ if [ "$PORTFW" ] && [ "$NAT" ]; then
|
||||||
if [ "$SRCIP" ]; then
|
if [ "$SRCIP" ]; then
|
||||||
SRCIP="-s ${SRCIP}"
|
SRCIP="-s ${SRCIP}"
|
||||||
fi
|
fi
|
||||||
if [[ ! "$DSTIP" ]] && [[ ! "$DSTIF" ]]; then
|
if [ ! "$DSTIP" ] && [ ! "$DSTIF" ]; then
|
||||||
DSTIP="$EXTIP"
|
DSTIP="-d $EXTIP"
|
||||||
|
elif [ "$DSTIP" ]; then
|
||||||
|
DSTIP="-d $DSTIP"
|
||||||
fi
|
fi
|
||||||
#PORTADD=( ${i//:/ } )
|
#PORTADD=( ${i//:/ } )
|
||||||
$IPTABLES -A PREROUTING -t nat ${DSTIF} -p ${DSTPROTO} ${SRCIP} \
|
$IPTABLES -A PREROUTING -t nat ${DSTIF} -p ${DSTPROTO} ${SRCIP} \
|
||||||
--dport ${DSTPORT} -d ${DSTIP} -j DNAT --to \
|
--dport ${DSTPORT} -d ${DSTIP} -j DNAT --to \
|
||||||
${DSTINTIP}:${DSTINTPORT}
|
${DSTINTIP}:${DSTINTPORT}
|
||||||
$IPTABLES -A INPUT -p ${DSTPROTO} ${M_STATE} ${C_STATE} NEW ${DSTIF} ${SRCIP} \
|
$IPTABLES -A INPUT -p ${DSTPROTO} ${M_STATE} ${C_STATE} NEW ${DSTIF} ${SRCIP} \
|
||||||
--dport ${DSTPORT} -d ${DSTIP} -j ACCEPT
|
--dport ${DSTPORT} ${DSTIP} -j ACCEPT
|
||||||
display_c DEFAULT "\t${GREEN}${PORTFWADD[0]}:${BLUE}${PORTFWADD[1]}:${PURPLE}${PORTFWADD[2]}:${PORTFWADD[3]}:${PORTFWADD[4]}${AQUA}->${BLUE}${PORTFWADD[5]}:${PORTFWADD[6]} "
|
display_c DEFAULT "\t${GREEN}${PORTFWADD[0]}:${BLUE}${PORTFWADD[1]}:${PURPLE}${PORTFWADD[2]}:${PORTFWADD[3]}:${PORTFWADD[4]}${AQUA}->${BLUE}${PORTFWADD[5]}:${PORTFWADD[6]} "
|
||||||
done
|
done
|
||||||
reset_color
|
reset_color
|
||||||
|
|
Loading…
Reference in New Issue