run: Add IPv6 forwarding if default route
* Enable IPv6 forwarding if docker daemon provided a default route * For now this requires the --privileged flag, but this could be hacked around using `ip netns` madness.
This commit is contained in:
parent
6aca273d89
commit
e6f7904344
10
bin/ovpn_run
10
bin/ovpn_run
@ -43,6 +43,16 @@ if [ -r "$EASYRSA_PKI/crl.pem" ]; then
|
|||||||
ARGS=("--crl-verify" "$OPENVPN/crl.pem")
|
ARGS=("--crl-verify" "$OPENVPN/crl.pem")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
ip -6 route show default 2>/dev/null
|
||||||
|
if [ $? = 0 ]; then
|
||||||
|
echo "Enabling IPv6 Forwarding"
|
||||||
|
# If this fails, ensure the docker container is run with --privileged
|
||||||
|
# Could be side stepped with `ip netns` madness to drop privileged flag
|
||||||
|
|
||||||
|
sysctl net.ipv6.conf.default.forwarding=1
|
||||||
|
sysctl net.ipv6.conf.all.forwarding=1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$#" -gt 0 ]; then
|
if [ "$#" -gt 0 ]; then
|
||||||
exec openvpn "$@"
|
exec openvpn "$@"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user