master
parent
a9677f5d51
commit
71cce7bc99
|
@ -78,14 +78,18 @@ if [ $CONNTRACK ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $ROUTING ]; then
|
if [ $ROUTING ]; then
|
||||||
|
echo -n "Adding route: "
|
||||||
for i in `grep -v "\#" $ROUTING`; do
|
for i in `grep -v "\#" $ROUTING`; do
|
||||||
ROUTE=( ${i//:/ } )
|
ROUTE=( ${i//:/ } )
|
||||||
$IPTABLES -A FORWARD -i ${ROUTE[0]} -o ${ROUTE[2]} \
|
$IPTABLES -A FORWARD -i ${ROUTE[0]} -o ${ROUTE[2]} \
|
||||||
-s ${ROUTE[1]} -d ${ROUTE[3]} -j ACCEPT
|
-s ${ROUTE[1]} -d ${ROUTE[3]} -j ACCEPT
|
||||||
if [ ${ROUTE[4]} == "1" ]
|
if [ ${ROUTE[4]} == "1" ]; then
|
||||||
|
echo -n "${ROUTE[0]}/${ROUTE[1]}<->${ROUTE[1]}/${ROUTE[3]} "
|
||||||
$IPTABLES -A FORWARD -o ${ROUTE[0]} -i ${ROUTE[2]} \
|
$IPTABLES -A FORWARD -o ${ROUTE[0]} -i ${ROUTE[2]} \
|
||||||
-d ${ROUTE[1]} -s ${ROUTE[3]} -j ACCEPT
|
-d ${ROUTE[1]} -s ${ROUTE[3]} -j ACCEPT
|
||||||
fi
|
else
|
||||||
|
echo -n "${ROUTE[0]}/${ROUTE[1]}->${ROUTE[1]}/${ROUTE[3]} "
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue