add support for outer route

This commit is contained in:
Roy Olav Purser 2021-10-13 13:58:01 +02:00
parent ef0b0c489c
commit c50a5fbd7f
Signed by: roypur
GPG Key ID: E14D26A036F21656

View File

@ -18,5 +18,10 @@ echo ${VPN_IPV6_ADDRESS}
ip addr add ${VPN_IPV4_ADDRESS} dev vpn ip addr add ${VPN_IPV4_ADDRESS} dev vpn
ip addr add ${VPN_IPV6_ADDRESS} dev vpn ip addr add ${VPN_IPV6_ADDRESS} dev vpn
if [ -z ${OUTER_ROUTE+x} ]
then
ip -4 route add "${OUTER_ROUTE}" via "${OUTER_GATEWAY}"
fi
ip -4 route add default dev vpn ip -4 route add default dev vpn
ip -6 route add default dev vpn ip -6 route add default dev vpn