Skip to content

Instantly share code, notes, and snippets.

@radmen
Created April 30, 2019 10:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save radmen/6ba3b1da716b1de15c8372445bccd603 to your computer and use it in GitHub Desktop.
Save radmen/6ba3b1da716b1de15c8372445bccd603 to your computer and use it in GitHub Desktop.
NordVPN + Docker
#!/usr/bin/env bash
INTERFACE=$1
STATUS=$2
# Make sure we're always getting the standard response strings
LANG='C'
case "${INTERFACE}-${STATUS}" in
tun0-up)
ip route add default dev "$INTERFACE"
ip route del 0.0.0.0/1 dev "$INTERFACE"
ip route del 128.0.0.0/1 dev "$INTERFACE"
;;
esac

There's a lot of issues with Docker networks on Linux when connected with VPN.

I've had it also and after some search found out the correct solution.

In case of Manjaro (probably every distro w/ NetworkManager) this can be fixed via this simple dispatcher script.

Place it under /etc/NetworkManager/dispatcher.d/10-nordvpn and restart vpn connection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment