add logging to inner and outer
This commit is contained in:
parent
82e8db22f6
commit
a780644bbf
@ -12,18 +12,28 @@ ip link set dev vpn up
|
|||||||
ip addr flush dev vpn
|
ip addr flush dev vpn
|
||||||
ip route flush dev vpn
|
ip route flush dev vpn
|
||||||
|
|
||||||
echo ${VPN_IPV4_ADDRESS}
|
echo "-- <start> inner.sh --"
|
||||||
echo ${VPN_IPV6_ADDRESS}
|
|
||||||
|
echo "VPN_IPV4_ADDRESS=${VPN_IPV4_ADDRESS}"
|
||||||
|
echo "VPN_IPV6_ADDRESS=${VPN_IPV6_ADDRESS}"
|
||||||
|
|
||||||
|
echo "OUTER_ROUTE_V4=${OUTER_ROUTE_V4}"
|
||||||
|
echo "OUTER_GATEWAY_V4=${OUTER_GATEWAY_V4}"
|
||||||
|
|
||||||
|
echo "OUTER_ROUTE_V6=${OUTER_ROUTE_V6}"
|
||||||
|
echo "OUTER_GATEWAY_V6=${OUTER_GATEWAY_V6}"
|
||||||
|
|
||||||
|
echo "-- <end> inner.sh --"
|
||||||
|
|
||||||
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_V4+x} ]
|
if [ -n "${OUTER_ROUTE_V4}" && -n "${OUTER_GATEWAY_V4}" ]
|
||||||
then
|
then
|
||||||
ip -4 route add "${OUTER_ROUTE_V4}" via "${OUTER_GATEWAY_V4}"
|
ip -4 route add "${OUTER_ROUTE_V4}" via "${OUTER_GATEWAY_V4}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z ${OUTER_ROUTE_V6+x} ]
|
if [ -n "${OUTER_ROUTE_V6}" && -n "${OUTER_GATEWAY_V6}" ]
|
||||||
then
|
then
|
||||||
ip -6 route add "${OUTER_ROUTE_V6}" via "${OUTER_GATEWAY_V6}"
|
ip -6 route add "${OUTER_ROUTE_V6}" via "${OUTER_GATEWAY_V6}"
|
||||||
fi
|
fi
|
||||||
|
@ -1,4 +1,18 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
echo "-- <start> outer.sh --"
|
||||||
|
|
||||||
|
echo "VPN_IPV4_ADDRESS=${VPN_IPV4_ADDRESS}"
|
||||||
|
echo "VPN_IPV6_ADDRESS=${VPN_IPV6_ADDRESS}"
|
||||||
|
|
||||||
|
echo "OUTER_ROUTE_V4=${OUTER_ROUTE_V4}"
|
||||||
|
echo "OUTER_GATEWAY_V4=${OUTER_GATEWAY_V4}"
|
||||||
|
|
||||||
|
echo "OUTER_ROUTE_V6=${OUTER_ROUTE_V6}"
|
||||||
|
echo "OUTER_GATEWAY_V6=${OUTER_GATEWAY_V6}"
|
||||||
|
|
||||||
|
echo "-- <end> outer.sh --"
|
||||||
|
|
||||||
ip link set dev veth-outer up
|
ip link set dev veth-outer up
|
||||||
ip addr add ${VETH_IPV4_ADDRESS} dev veth-outer
|
ip addr add ${VETH_IPV4_ADDRESS} dev veth-outer
|
||||||
ip addr add ${VETH_IPV6_ADDRESS} dev veth-outer
|
ip addr add ${VETH_IPV6_ADDRESS} dev veth-outer
|
||||||
|
Loading…
Reference in New Issue
Block a user