Commit 980ddf05 authored by David Johnson's avatar David Johnson

Setup /etc/iproute2/rt_tables properly on server side for net30mp case.

parent 0b51ea75
......@@ -193,6 +193,7 @@ EOF
systemctl enable openvpn@server.service
systemctl start openvpn@server.service
elif [ $VPNTYPE = $TOPO_NET30MP ]; then
mkdir -p /etc/iproute2
# For each aggregate, add a separate server config file.
for aggprefix in $AGGREGATES ; do
agglan="${aggprefix}lan"
......@@ -250,9 +251,10 @@ EOF
i=`expr $i - 1`
sleep 1
done
echo $aggnum $aggprefix >> /etc/iproute2/rt_tables
ip rule add from $agg_cidr table $aggprefix
ip rule add iif tun-$aggprefix to $agg_cidr table $aggprefix
ip route add $mlan_CIDR dev tun-$aggprefix table $aggnum
ip route add $mlan_CIDR dev tun-$aggprefix table $aggprefix
done
else
echo "VPNTYPE '$VPNTYPE' not yet supported; aborting!"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment