add outer route ipv6 support

This commit is contained in:
Roy Olav Purser 2021-10-13 14:09:50 +02:00
parent c50a5fbd7f
commit f76b3807b9
Signed by: roypur
GPG Key ID: E14D26A036F21656

View File

@ -18,9 +18,14 @@ 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} ] if [ -z ${OUTER_ROUTE_V4+x} ]
then then
ip -4 route add "${OUTER_ROUTE}" via "${OUTER_GATEWAY}" ip -4 route add "${OUTER_ROUTE_V4}" via "${OUTER_GATEWAY_V4}"
fi
if [ -z ${OUTER_ROUTE_V6+x} ]
then
ip -6 route add "${OUTER_ROUTE_V6}" via "${OUTER_GATEWAY_V6}"
fi fi
ip -4 route add default dev vpn ip -4 route add default dev vpn