master
parent
5f0566f17c
commit
e19a7aaf40
|
@ -174,15 +174,15 @@ fi
|
||||||
if [ $PORTFW ] && [ $NAT ]; then
|
if [ $PORTFW ] && [ $NAT ]; then
|
||||||
echo -en "\E[33mAdding port forward for:\E[37m "
|
echo -en "\E[33mAdding port forward for:\E[37m "
|
||||||
for i in `grep -v "\#" $PORTFW`; do
|
for i in `grep -v "\#" $PORTFW`; do
|
||||||
echo -en "\E[32m${PORTADD[0]}\E[37m/\E[35m${PORTADD[1]}\E[37m->${PORTADD[2]}:${PORTADD[3]} "
|
|
||||||
PORTADD=( ${i//:/ } )
|
PORTADD=( ${i//:/ } )
|
||||||
$IPTABLES -A PREROUTING -t nat -i $NATEXTIF -p ${PORTADD[1]} \
|
$IPTABLES -A PREROUTING -t nat -i $NATEXTIF -p ${PORTADD[1]} \
|
||||||
--dport ${PORTADD[0]} -j DNAT --to \
|
--dport ${PORTADD[0]} -j DNAT --to \
|
||||||
${PORTADD[2]}:${PORTADD[3]}
|
${PORTADD[2]}:${PORTADD[3]}
|
||||||
$IPTABLES -A INPUT -p ${PORTADD[1]} -m state --state NEW \
|
$IPTABLES -A INPUT -p ${PORTADD[1]} -m state --state NEW \
|
||||||
--dport ${PORTADD[0]} -i $NATEXTIF -j ACCEPT
|
--dport ${PORTADD[0]} -i $NATEXTIF -j ACCEPT
|
||||||
|
echo -en "\E[32m${PORTADD[0]}\E[37m/\E[35m${PORTADD[1]}\E[37m->${PORTADD[2]}:${PORTADD[3]} "
|
||||||
done
|
done
|
||||||
|
echo -ne "\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $LANDHCPSERVER ]; then
|
if [ $LANDHCPSERVER ]; then
|
||||||
|
|
Loading…
Reference in New Issue