Last active
January 3, 2020 09:51
-
-
Save brotich/963410faa88fa71bf991e10c8b4fb3a3 to your computer and use it in GitHub Desktop.
fix vpn and docker conflct
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eu -o pipefail | |
# https://github.com/docker/libnetwork/issues/779#issuecomment-231727303 | |
# this fixes docker unable to start due to ip address conflict | |
echo "Adding default route to $route_vpn_gateway with /0 mask..." | |
ip route add default via $route_vpn_gateway | |
echo "Removing /1 routes..." | |
ip route del 0.0.0.0/1 via $route_vpn_gateway | |
ip route del 128.0.0.0/1 via $route_vpn_gateway |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
# add the following the openvpn.config | |
route-up /usr/local/bin/fix-vpn-routes.sh | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment