haugene / vpn-configs-contrib

A collection of configs for various VPN providers
GNU General Public License v3.0
188 stars 752 forks source link

NordVPN #55

Closed allywilson closed 3 years ago

allywilson commented 3 years ago

Is there a pinned issue for this?

Is there an existing or similar issue for this?

Is there any comment in the documentation for this?

Is this related to a provider?

Are you using the latest release?

Have you tried using the dev branch latest?

Config used

docker run --cap-add=NET_ADMIN -d \ -v /media/DataStorage01/Downloads/:/data \ -v /etc/localtime:/etc/localtime:ro \ -e OPENVPN_PROVIDER=NORDVPN \ -e OPENVPN_USERNAME=MegaSecret \ -e OPENVPN_PASSWORD=SuperSecret\ -e WEBPROXY_ENABLED=false \ -e LOCAL_NETWORK=10.0.0.0/24,192.168.1.0/24 \ --log-driver json-file \ --log-opt max-size=10m \ -p 9091:9091 \ --dns 8.8.8.8 \ --dns 8.8.4.4 \ -e "OPENVPN_OPTS=--inactive 3600 --ping 10 --ping-exit 60" \ -e "TRANSMISSION_RPC_AUTHENTICATION_REQUIRED=true" \ -e "TRANSMISSION_RPC_ENABLED=true" \ -e "TRANSMISSION_RPC_USERNAME=MegaSecret" \ -e "TRANSMISSION_RPC_PASSWORD=SuperSecret" \ -e CREATE_TUN_DEVICE=true \ --restart=always \ --name=transmission \ haugene/transmission-openvpn:latest

Current Behavior

Was working fine, but decided to update my docker images.

Updated, and now the container restarts every 60 seconds as it can't connect.

Expected Behavior

Connect to VPN

How have you tried to solve the problem?

Checked with NordVPN if they had any issues. Made sure I can resolve the NordVPN API and Downloads from within the container. It's also complaining that /etc/openvpn/nordvpn/default.ovpn doesn't exist - which is correct, it's not in the image it seems.

Log output

Starting container with revision: 8744279e2cd191486ca5ae21e8e051b7b1000b71 Creating TUN device /dev/net/tun Using OpenVPN provider: NORDVPN Running with VPN_CONFIG_SOURCE auto Provider NORDVPN has a bundled setup script. Defaulting to internal config Executing setup script for NORDVPN 2021-09-10 19:35:23 Checking curl installation 2021-09-10 19:35:23 Removing existing configs 2021-09-10 19:35:23 Selecting the best server... 2021-09-10 19:35:23 Searching for technology: openvpn_udp 2021-09-10 19:35:23 Unable to find a server with the specified parameters, using any recommended server 2021-09-10 19:35:23 Best server : 2021-09-10 19:35:23 Downloading config: default.ovpn 2021-09-10 19:35:23 Downloading from: https://downloads.nordcdn.com/configs/files/ovpn_udp/servers/.udp.ovpn curl: (7) Failed to connect to downloads.nordcdn.com port 443: Connection refused No VPN configuration provided. Using default. Modifying /etc/openvpn/nordvpn/default.ovpn for best behaviour in this container Modification: Point auth-user-pass option to the username/password file sed: can't read /etc/openvpn/nordvpn/default.ovpn: No such file or directory Modification: Change ca certificate path sed: can't read /etc/openvpn/nordvpn/default.ovpn: No such file or directory Modification: Change ping options sed: can't read /etc/openvpn/nordvpn/default.ovpn: No such file or directory sed: can't read /etc/openvpn/nordvpn/default.ovpn: No such file or directory sed: can't read /etc/openvpn/nordvpn/default.ovpn: No such file or directory sed: can't read /etc/openvpn/nordvpn/default.ovpn: No such file or directory Setting OpenVPN credentials... adding route to local network 10.0.0.0/24 via 172.17.0.1 dev eth0 adding route to local network 192.168.1.0/24 via 172.17.0.1 dev eth0 Fri Sep 10 19:36:23 2021 disabling NCP mode (--ncp-disable) because not in P2MP client or server mode Options error: You must define TUN/TAP device (--dev) Use --help for more information. Starting container with revision: 8744279e2cd191486ca5ae21e8e051b7b1000b71

Environment

- OS: raspbian(Linux 5.10.17-v8+ haugene/docker-transmission-openvpn#1421 SMP PREEMPT Thu May 27 14:01:37 BST 2021 aarch64 GNU/Linux)
- Docker: 20.10.8, build 3967b7d

Anything else?

No response

edgd1er commented 3 years ago

@allywilson,

As you may have noticed, the nordvpn api cannot guess your settings, that's why 2021-09-10 19:35:23 Best server : has no value

Hence, the openvpn settings url is malformed: Downloading from: https://downloads.nordcdn.com/configs/files/ovpn_udp/servers/.udp.ovpn should look like: https://downloads.nordcdn.com/configs/files/ovpn_/servers/.nordvpn.com..ovpn

at least, two vars are missing, possibly three. (country, technology, and protocol(optional) ) see https://haugene.github.io/docker-transmission-openvpn/provider-specific/

allywilson commented 3 years ago

Hi, Thanks for getting back to me so quickly.

I've updated my run to be:

docker run --cap-add=NET_ADMIN -d \
              -v /media/DataStorage01/Downloads/:/data \
              -v /etc/localtime:/etc/localtime:ro \
              -e OPENVPN_PROVIDER=NORDVPN \
              -e OPENVPN_USERNAME=\
              -e OPENVPN_PASSWORD=\
              -e WEBPROXY_ENABLED=false \
              -e LOCAL_NETWORK=10.0.0.0/24,192.168.1.0/24 \
              --log-driver json-file \
              --log-opt max-size=10m \
              -p 9091:9091 \
              --dns 8.8.8.8 \
              --dns 8.8.4.4 \
              -e "OPENVPN_OPTS=--inactive 3600 --ping 10 --ping-exit 60" \
              -e "TRANSMISSION_RPC_AUTHENTICATION_REQUIRED=true" \
              -e "TRANSMISSION_RPC_ENABLED=true" \
              -e "TRANSMISSION_RPC_USERNAME=" \
              -e "TRANSMISSION_RPC_PASSWORD=" \
              -e CREATE_TUN_DEVICE=true \
              -e NORDVPN_COUNTRY=GB \
              -e NORDVPN_CATEGORY=legacy_standard \
              -e NORDVPN_PROTOCOL=udp \
              --restart=always \
              --name=transmission \
              haugene/transmission-openvpn:latest

Note the 3 additional NORDVPN settings.

But unfortunately it still does the same thing:

Starting container with revision: 8744279e2cd191486ca5ae21e8e051b7b1000b71Creating TUN device /dev/net/tunUsing OpenVPN provider: NORDVPNRunning with VPN_CONFIG_SOURCE autoProvider NORDVPN has a bundled setup script. Defaulting to internal configExecuting setup script for NORDVPN 2021-09-11 16:57:35 Checking curl installation 2021-09-11 16:57:35 Removing existing configs 2021-09-11 16:57:35 Selecting the best server... 2021-09-11 16:57:35 Searching for technology: openvpn_udp 2021-09-11 16:57:35 Unable to find a server with the specified parameters, using any recommended server 2021-09-11 16:57:35 Best server : 2021-09-11 16:57:35 Downloading config: default.ovpn 2021-09-11 16:57:35 Downloading from: https://downloads.nordcdn.com/configs/files/ovpn_udp/servers/.udp.ovpn curl: (7) Failed to connect to downloads.nordcdn.com port 443: Connection refused No VPN configuration provided. Using default. Modifying /etc/openvpn/nordvpn/default.ovpn for best behaviour in this container Modification: Point auth-user-pass option to the username/password file sed: can't read /etc/openvpn/nordvpn/default.ovpn: No such file or directory Modification: Change ca certificate path sed: can't read /etc/openvpn/nordvpn/default.ovpn: No such file or directory Modification: Change ping options sed: can't read /etc/openvpn/nordvpn/default.ovpn: No such file or directory sed: can't read /etc/openvpn/nordvpn/default.ovpn: No such file or directory sed: can't read /etc/openvpn/nordvpn/default.ovpn: No such file or directory sed: can't read /etc/openvpn/nordvpn/default.ovpn: No such file or directory Setting OpenVPN credentials... adding route to local network 10.0.0.0/24 via 172.17.0.1 dev eth0 adding route to local network 192.168.1.0/24 via 172.17.0.1 dev eth0 Sat Sep 11 16:58:35 2021 disabling NCP mode (--ncp-disable) because not in P2MP client or server mode Options error: You must define TUN/TAP device (--dev) Use --help for more information.

It keeps referencing default.ovpn - should that exist in the image or not? It's looking for it, but it does not exist.

thank you for your help!

allywilson commented 3 years ago

Figured it out. Something on my network (wireless range extender) was responding to DNS requests with its own IP address (it does not even have a DNS server component, so that's new). Updated it's firmware, rebooted - all fixed. shrug

Thanks again!