From c50a5fbd7f96a298e42848a8625280b76522d309 Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Wed, 13 Oct 2021 13:58:01 +0200 Subject: [PATCH] add support for outer route --- scripts/inner.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/inner.sh b/scripts/inner.sh index d3998dd..7677bec 100644 --- a/scripts/inner.sh +++ b/scripts/inner.sh @@ -18,5 +18,10 @@ echo ${VPN_IPV6_ADDRESS} ip addr add ${VPN_IPV4_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 -6 route add default dev vpn