haugene / vpn-configs-contrib

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

NordVPN suddenly no longer connects #137

Closed degudejung closed 1 year ago

degudejung commented 1 year 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 the container/transmission?

Are you using the latest release?

Have you tried using the dev branch latest?

Config used

version: '3.3'
services:
    transmission-openvpn:
        container_name: transmission
        environment:
          - PUID=1000
          - PGID=100
          - TZ=Europe/Berlin
          - OPENVPN_PROVIDER=NORDVPN
          - OPENVPN_USERNAME=user
          - OPENVPN_PASSWORD=pass
          - LOCAL_NETWORK=192.168.10.0/24
          - HEALTH_CHECK_HOST=google.de
        cap_add:
            - NET_ADMIN
        volumes:
            - transmission:/data
        logging:
            driver: json-file
            options:
                max-size: 10m
        ports:
            - '9091:9091'
        image: haugene/transmission-openvpn
        restart: unless-stopped
volumes:
    transmission:
        external: true

Current Behavior

It does not connect to NordVPN -> GUI does not come alive. Fails with "AUTH: Received control message: AUTH_FAILED" but I know for sure that the credentials are correct.

Expected Behavior

After/with running NordVPN script, it connects to the provider

How have you tried to solve the problem?

Tried with rebuilding container, setting up new/fresh volumes, changing pw with NordVPN.

Log output

Starting container with revision: a95f586492b2b7e8ff2cc8ac7f91bc43c0cccc40 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 2022-09-11 22:24:09 Checking curl installation 2022-09-11 22:24:09 Removing existing configs 2022-09-11 22:24:09 Selecting the best server... 2022-09-11 22:24:09 Searching for group: legacy_p2p 2022-09-11 22:24:09 Searching for technology: openvpn_udp 2022-09-11 22:24:09 Best server : de1064.nordvpn.com 2022-09-11 22:24:09 Downloading config: default.ovpn 2022-09-11 22:24:09 Downloading from: https://downloads.nordcdn.com/configs/files/ovpn_udp/servers/de1064.nordvpn.com.udp.ovpn Starting OpenVPN using config default.ovpn Modifying /etc/openvpn/nordvpn/default.ovpn for best behaviour in this container Modification: Point auth-user-pass option to the username/password file Modification: Change ca certificate path Modification: Change ping options Modification: Update/set resolv-retry to 15 seconds Modification: Change tls-crypt keyfile path Modification: Set output verbosity to 3 Modification: Remap SIGUSR1 signal to SIGTERM, avoid OpenVPN restart loop Setting OpenVPN credentials... adding route to local network 192.168.10.0/24 via 172.21.0.1 dev eth0 Sun Sep 11 22:24:10 2022 OpenVPN 2.4.7 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Mar 22 2022 Sun Sep 11 22:24:10 2022 library versions: OpenSSL 1.1.1f 31 Mar 2020, LZO 2.10 Sun Sep 11 22:24:10 2022 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts Sun Sep 11 22:24:10 2022 Outgoing Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication Sun Sep 11 22:24:10 2022 Incoming Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication Sun Sep 11 22:24:10 2022 TCP/UDP: Preserving recently used remote address: [AF_INET]45.141.152.51:1194 Sun Sep 11 22:24:10 2022 Socket Buffers: R=[212992->212992] S=[212992->212992] Sun Sep 11 22:24:10 2022 UDP link local: (not bound) Sun Sep 11 22:24:10 2022 UDP link remote: [AF_INET]45.141.152.51:1194 Sun Sep 11 22:24:10 2022 TLS: Initial packet from [AF_INET]45.141.152.51:1194, sid=d62aa660 f31bb56e Sun Sep 11 22:24:10 2022 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this Sun Sep 11 22:24:12 2022 VERIFY OK: depth=2, C=PA, O=NordVPN, CN=NordVPN Root CA Sun Sep 11 22:24:12 2022 VERIFY OK: depth=1, C=PA, O=NordVPN, CN=NordVPN CA7 Sun Sep 11 22:24:12 2022 VERIFY KU OK Sun Sep 11 22:24:12 2022 Validating certificate extended key usage Sun Sep 11 22:24:12 2022 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication Sun Sep 11 22:24:12 2022 VERIFY EKU OK Sun Sep 11 22:24:12 2022 VERIFY X509NAME OK: CN=de1064.nordvpn.com Sun Sep 11 22:24:12 2022 VERIFY OK: depth=0, CN=de1064.nordvpn.com Sun Sep 11 22:24:12 2022 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, 4096 bit RSA Sun Sep 11 22:24:12 2022 [de1064.nordvpn.com] Peer Connection Initiated with [AF_INET]45.141.152.51:1194 Sun Sep 11 22:24:13 2022 SENT CONTROL [de1064.nordvpn.com]: 'PUSH_REQUEST' (status=1) Sun Sep 11 22:24:18 2022 SENT CONTROL [de1064.nordvpn.com]: 'PUSH_REQUEST' (status=1) Sun Sep 11 22:24:18 2022 AUTH: Received control message: AUTH_FAILED Sun Sep 11 22:24:18 2022 SIGTERM[soft,auth-failure] received, process exiting

Environment

- OS: Alpine 3.16
- Docker: 20.18 CE

Anything else?

I copy-pasted a perfectly well running docker compose file from one PC to another. It worked flawlessly on the old PC for months but would start on the new PC. I thought maybe NordVPN would still honor some old token/cache or whatever but no new connects with the old credentials, so I reset the password. The old PC would connect again with the new password but the new PC still would not. After restarting the container on the old PC for a few times, it now has authentication issues on both machines. Very well done...

pkishino commented 1 year ago

Have you verified that the password is the same on both machines in the docker image? No special characters etc.. try downloading a specific nordvpn ovpn config and run it using custom etc..

degudejung commented 1 year ago

Thanks for the hint. The pw reset indeed produced special characters but that had no effect here, since I use the special Linux authorization credentials NordVPN offers that coexist with username/passwd and have no special characters. It does not work with username/passwd, either.

Apparently, I forgot to turn off the old container yesterday, so it continued to loop. When I checked in tonight, however, it suddenly was successfully connected and I could access the UI. Curious as I am, I stopped the container and restarted it. It has now been looping for about an hours with no successful connection (log as above).

For the new PC, I tried your recommendation and mounted an .ovpn file via the docker compose. It does not look like it uses that file, though. Logs show, it is still identifying the best server - and not using the one from the .ovpn. I guess there is more to do than just mounting the file? I would probably shy away from forking and maintaining my own repository just to use a certain NordVPN .ovpn config.

Modification: Remap SIGUSR1 signal to SIGTERM, avoid OpenVPN restart loop
Setting OpenVPN credentials...
adding route to local network 192.168.10.0/24 via 172.21.0.1 dev eth0
Options error: Unrecognized option or missing or extra parameter(s) in /etc/openvpn/nordvpn/default.ovpn:1: html (2.4.7)
Use --help for more information.
Starting container with revision: a95f586492b2b7e8ff2cc8ac7f91bc43c0cccc40
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
2022-09-12 22:27:06 Checking curl installation
2022-09-12 22:27:06 Removing existing configs
2022-09-12 22:27:06 Selecting the best server...
parse error: Invalid numeric literal at line 1, column 7
2022-09-12 22:27:06 Searching for technology: openvpn_udp
parse error: Invalid numeric literal at line 1, column 7
2022-09-12 22:27:06 Unable to find a server with the specified parameters, using any recommended server
parse error: Invalid numeric literal at line 1, column 7
2022-09-12 22:27:06 Best server : 
2022-09-12 22:27:06 Downloading config: default.ovpn
2022-09-12 22:27:06 Downloading from: https://downloads.nordcdn.com/configs/files/ovpn_udp/servers/.udp.ovpn
Starting OpenVPN using config default.ovpn
Modifying /etc/openvpn/nordvpn/default.ovpn for best behaviour in this container
Modification: Point auth-user-pass option to the username/password file
Modification: Change ca certificate path
Modification: Change ping options
Modification: Update/set resolv-retry to 15 seconds
Modification: Change tls-crypt keyfile path
Modification: Set output verbosity to 3
Modification: Remap SIGUSR1 signal to SIGTERM, avoid OpenVPN restart loop
Setting OpenVPN credentials...
degudejung commented 1 year ago

Sorry to bother but I really found your project a great tool in the past and I would so (!) appreciate to continue using it.

In the meantime I did some more tweaking around. I both tested switching back to 3.7.1 and dev images. The error messages may have been different but it did not resolve the problem. I also added the (NordVPN-) provider-specific settings with little effect. Lastly, someone mentioned commenting out UID and GID - tried that, too. Could you please take a look again?

version: '3.3'
services:
    transmission-openvpn:
        container_name: transmission
        environment:
            - PUID=1000
            - PGID=100
            - TZ=Europe/Berlin
            - OPENVPN_PROVIDER=NORDVPN
            - NORDVPN_COUNTRY=DE
            - NORDVPN_CATEGORY=legacy_p2p
            - NORDVPN_PROTOCOL=UDP
            - OPENVPN_USERNAME=[name@provider.de or manual credentials]
            - OPENVPN_PASSWORD=[password]
            - LOCAL_NETWORK=192.168.10.0/24
            - HEALTH_CHECK_HOST=google.de
        cap_add:
            - NET_ADMIN
        volumes:
            - /home/administrator/transmission:/data
#            - /home/administrator/transmission/de1042.nordvpn.com.udp1194.ovpn:/etc/openvpn/custom/default.ovpn
        logging:
            driver: json-file
            options:
                max-size: 10m
        ports:
             - '9091:9091'
        image: haugene/transmission-openvpn:dev
        restart: unless-stopped
`Starting container with revision: 2c1f6102ec454003e980d6f64d60b6dc48c75bf8
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
INFO: OVPN: Checking curl installation
INFO: OVPN: DNS resolution ok
INFO: OVPN: ok, configurations download site reachable
INFO: OVPN: Removing existing configs in /etc/openvpn/nordvpn
Checking NORDPVN API responses
INFO: OVPN:Selecting the best server...
INFO: OVPN: Searching for country : DE (81)
INFO: OVPN: Searching for group: legacy_p2p
INFO: OVPN:Searching for technology: openvpn_udp
INFO: OVPN: Best server : de918.nordvpn.com, load: 8
INFO: OVPN: Downloading config: de918.nordvpn.com.ovpn
INFO: OVPN: Downloading from: https://downloads.nordcdn.com/configs/files/ovpn_udp/servers/de918.nordvpn.com.udp.ovpn
Starting OpenVPN using config de918.nordvpn.com.ovpn
Modifying /etc/openvpn/nordvpn/de918.nordvpn.com.ovpn for best behaviour in this container
Modification: Point auth-user-pass option to the username/password file
Modification: Change ca certificate path
Modification: Change ping options
Modification: Update/set resolv-retry to 15 seconds
Modification: Change tls-crypt keyfile path
Modification: Set output verbosity to 3
Modification: Remap SIGUSR1 signal to SIGTERM, avoid OpenVPN restart loop
Modification: Updating status for config failure detection
Setting OpenVPN credentials...
adding route to local network 192.168.10.0/24 via 172.21.0.1 dev eth0
/etc/openvpn/start.sh: line 321: OPENVPN_OPTS: unbound variable
Starting container with revision: 2c1f6102ec454003e980d6f64d60b6dc48c75bf8
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
INFO: OVPN: Checking curl installation
INFO: OVPN: DNS resolution ok
INFO: OVPN: ok, configurations download site reachable
INFO: OVPN: Removing existing configs in /etc/openvpn/nordvpn
Checking NORDPVN API responses
INFO: OVPN:Selecting the best server...
INFO: OVPN: Searching for country : DE (81)
INFO: OVPN: Searching for group: legacy_p2p
INFO: OVPN:Searching for technology: openvpn_udp
INFO: OVPN: Best server : de918.nordvpn.com, load: 8
INFO: OVPN: Downloading config: de918.nordvpn.com.ovpn
INFO: OVPN: Downloading from: https://downloads.nordcdn.com/configs/files/ovpn_udp/servers/de918.nordvpn.com.udp.ovpn
Starting OpenVPN using config de918.nordvpn.com.ovpn
Modifying /etc/openvpn/nordvpn/de918.nordvpn.com.ovpn for best behaviour in this container
Modification: Point auth-user-pass option to the username/password file
Modification: Change ca certificate path
Modification: Change ping options
Modification: Update/set resolv-retry to 15 seconds
Modification: Change tls-crypt keyfile path
Modification: Set output verbosity to 3
Modification: Remap SIGUSR1 signal to SIGTERM, avoid OpenVPN restart loop
Modification: Updating status for config failure detection
Setting OpenVPN credentials...
adding route to local network 192.168.10.0/24 via 172.21.0.1 dev eth0
/etc/openvpn/start.sh: line 321: OPENVPN_OPTS: unbound variable
Starting container with revision: 2c1f6102ec454003e980d6f64d60b6dc48c75bf8
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
INFO: OVPN: Checking curl installation
INFO: OVPN: DNS resolution ok
INFO: OVPN: ok, configurations download site reachable
INFO: OVPN: Removing existing configs in /etc/openvpn/nordvpn
Checking NORDPVN API responses
INFO: OVPN:Selecting the best server...
INFO: OVPN: Searching for country : DE (81)
INFO: OVPN: Searching for group: legacy_p2p
INFO: OVPN:Searching for technology: openvpn_udp
INFO: OVPN: Best server : de918.nordvpn.com, load: 8
INFO: OVPN: Downloading config: de918.nordvpn.com.ovpn
INFO: OVPN: Downloading from: https://downloads.nordcdn.com/configs/files/ovpn_udp/servers/de918.nordvpn.com.udp.ovpn
Starting OpenVPN using config de918.nordvpn.com.ovpn
Modifying /etc/openvpn/nordvpn/de918.nordvpn.com.ovpn for best behaviour in this container
Modification: Point auth-user-pass option to the username/password file
Modification: Change ca certificate path
Modification: Change ping options
Modification: Update/set resolv-retry to 15 seconds
Modification: Change tls-crypt keyfile path
Modification: Set output verbosity to 3
Modification: Remap SIGUSR1 signal to SIGTERM, avoid OpenVPN restart loop
Modification: Updating status for config failure detection
Setting OpenVPN credentials...
adding route to local network 192.168.10.0/24 via 172.21.0.1 dev eth0
/etc/openvpn/start.sh: line 321: OPENVPN_OPTS: unbound variable
Starting container with revision: 2c1f6102ec454003e980d6f64d60b6dc48c75bf8
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
INFO: OVPN: Checking curl installation
INFO: OVPN: DNS resolution ok
INFO: OVPN: ok, configurations download site reachable
INFO: OVPN: Removing existing configs in /etc/openvpn/nordvpn
Checking NORDPVN API responses
INFO: OVPN:Selecting the best server...
INFO: OVPN: Searching for country : DE (81)
INFO: OVPN: Searching for group: legacy_p2p
INFO: OVPN:Searching for technology: openvpn_udp
INFO: OVPN: Best server : de918.nordvpn.com, load: 8
INFO: OVPN: Downloading config: de918.nordvpn.com.ovpn
INFO: OVPN: Downloading from: https://downloads.nordcdn.com/configs/files/ovpn_udp/servers/de918.nordvpn.com.udp.ovpn
Starting OpenVPN using config de918.nordvpn.com.ovpn
Modifying /etc/openvpn/nordvpn/de918.nordvpn.com.ovpn for best behaviour in this container
Modification: Point auth-user-pass option to the username/password file
Modification: Change ca certificate path
Modification: Change ping options
Modification: Update/set resolv-retry to 15 seconds
Modification: Change tls-crypt keyfile path
Modification: Set output verbosity to 3
Modification: Remap SIGUSR1 signal to SIGTERM, avoid OpenVPN restart loop
Modification: Updating status for config failure detection
Setting OpenVPN credentials...
adding route to local network 192.168.10.0/24 via 172.21.0.1 dev eth0
/etc/openvpn/start.sh: line 321: OPENVPN_OPTS: unbound variable
Starting container with revision: 2c1f6102ec454003e980d6f64d60b6dc48c75bf8
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
INFO: OVPN: Checking curl installation
INFO: OVPN: DNS resolution ok
INFO: OVPN: ok, configurations download site reachable
INFO: OVPN: Removing existing configs in /etc/openvpn/nordvpn
Checking NORDPVN API responses
INFO: OVPN:Selecting the best server...
INFO: OVPN: Searching for country : DE (81)
INFO: OVPN: Searching for group: legacy_p2p
INFO: OVPN:Searching for technology: openvpn_udp
INFO: OVPN: Best server : de918.nordvpn.com, load: 8
INFO: OVPN: Downloading config: de918.nordvpn.com.ovpn
INFO: OVPN: Downloading from: https://downloads.nordcdn.com/configs/files/ovpn_udp/servers/de918.nordvpn.com.udp.ovpn
Starting OpenVPN using config de918.nordvpn.com.ovpn
Modifying /etc/openvpn/nordvpn/de918.nordvpn.com.ovpn for best behaviour in this container
Modification: Point auth-user-pass option to the username/password file
Modification: Change ca certificate path
Modification: Change ping options
Modification: Update/set resolv-retry to 15 seconds
Modification: Change tls-crypt keyfile path
Modification: Set output verbosity to 3
Modification: Remap SIGUSR1 signal to SIGTERM, avoid OpenVPN restart loop
Modification: Updating status for config failure detection
Setting OpenVPN credentials...
adding route to local network 192.168.10.0/24 via 172.21.0.1 dev eth0
/etc/openvpn/start.sh: line 321: OPENVPN_OPTS: unbound variable
Starting container with revision: 2c1f6102ec454003e980d6f64d60b6dc48c75bf8
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
INFO: OVPN: Checking curl installation
INFO: OVPN: DNS resolution ok
INFO: OVPN: ok, configurations download site reachable
INFO: OVPN: Removing existing configs in /etc/openvpn/nordvpn
Checking NORDPVN API responses
INFO: OVPN:Selecting the best server...
INFO: OVPN: Searching for country : DE (81)
INFO: OVPN: Searching for group: legacy_p2p
INFO: OVPN:Searching for technology: openvpn_udp
INFO: OVPN: Best server : de918.nordvpn.com, load: 8
INFO: OVPN: Downloading config: de918.nordvpn.com.ovpn
INFO: OVPN: Downloading from: https://downloads.nordcdn.com/configs/files/ovpn_udp/servers/de918.nordvpn.com.udp.ovpn
Starting OpenVPN using config de918.nordvpn.com.ovpn
Modifying /etc/openvpn/nordvpn/de918.nordvpn.com.ovpn for best behaviour in this container
Modification: Point auth-user-pass option to the username/password file
Modification: Change ca certificate path
Modification: Change ping options
Modification: Update/set resolv-retry to 15 seconds
Modification: Change tls-crypt keyfile path
Modification: Set output verbosity to 3
Modification: Remap SIGUSR1 signal to SIGTERM, avoid OpenVPN restart loop
Modification: Updating status for config failure detection
Setting OpenVPN credentials...
adding route to local network 192.168.10.0/24 via 172.21.0.1 dev eth0
/etc/openvpn/start.sh: line 321: OPENVPN_OPTS: unbound variable
Starting container with revision: 2c1f6102ec454003e980d6f64d60b6dc48c75bf8
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
INFO: OVPN: Checking curl installation
INFO: OVPN: DNS resolution ok
INFO: OVPN: ok, configurations download site reachable
INFO: OVPN: Removing existing configs in /etc/openvpn/nordvpn
Checking NORDPVN API responses
INFO: OVPN:Selecting the best server...
INFO: OVPN: Searching for country : DE (81)
INFO: OVPN: Searching for group: legacy_p2p
INFO: OVPN:Searching for technology: openvpn_udp
INFO: OVPN: Best server : de918.nordvpn.com, load: 8
INFO: OVPN: Downloading config: de918.nordvpn.com.ovpn
INFO: OVPN: Downloading from: https://downloads.nordcdn.com/configs/files/ovpn_udp/servers/de918.nordvpn.com.udp.ovpn
Starting OpenVPN using config de918.nordvpn.com.ovpn
Modifying /etc/openvpn/nordvpn/de918.nordvpn.com.ovpn for best behaviour in this container
Modification: Point auth-user-pass option to the username/password file
Modification: Change ca certificate path
Modification: Change ping options
Modification: Update/set resolv-retry to 15 seconds
Modification: Change tls-crypt keyfile path
Modification: Set output verbosity to 3
Modification: Remap SIGUSR1 signal to SIGTERM, avoid OpenVPN restart loop
Modification: Updating status for config failure detection
Setting OpenVPN credentials...
adding route to local network 192.168.10.0/24 via 172.21.0.1 dev eth0
/etc/openvpn/start.sh: line 321: OPENVPN_OPTS: unbound variable
Starting container with revision: 2c1f6102ec454003e980d6f64d60b6dc48c75bf8
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
INFO: OVPN: Checking curl installation
INFO: OVPN: DNS resolution ok
INFO: OVPN: ok, configurations download site reachable
INFO: OVPN: Removing existing configs in /etc/openvpn/nordvpn
Checking NORDPVN API responses
INFO: OVPN:Selecting the best server...
INFO: OVPN: Searching for country : DE (81)
INFO: OVPN: Searching for group: legacy_p2p
INFO: OVPN:Searching for technology: openvpn_udp
INFO: OVPN: Best server : de918.nordvpn.com, load: 8
INFO: OVPN: Downloading config: de918.nordvpn.com.ovpn
INFO: OVPN: Downloading from: https://downloads.nordcdn.com/configs/files/ovpn_udp/servers/de918.nordvpn.com.udp.ovpn
Starting OpenVPN using config de918.nordvpn.com.ovpn
Modifying /etc/openvpn/nordvpn/de918.nordvpn.com.ovpn for best behaviour in this container
Modification: Point auth-user-pass option to the username/password file
Modification: Change ca certificate path
Modification: Change ping options
Modification: Update/set resolv-retry to 15 seconds
Modification: Change tls-crypt keyfile path
Modification: Set output verbosity to 3
Modification: Remap SIGUSR1 signal to SIGTERM, avoid OpenVPN restart loop
Modification: Updating status for config failure detection
Setting OpenVPN credentials...
adding route to local network 192.168.10.0/24 via 172.21.0.1 dev eth0
/etc/openvpn/start.sh: line 321: OPENVPN_OPTS: unbound variable`
pkishino commented 1 year ago

Look at the log.. it clearly shows the problem: OPENVPN_OPTS Is unbound.. It should by default as this as a bound but empty variable, not sure why this is coming up but you should be able to add it with no value. -OPENVPN_OPTS=“”

degudejung commented 1 year ago

thanks Patrick; that may seem the obvious solution to you but unfortunately not so much for me, being a user, not a developer. I did add that to the stack and here is how the error changed:

Setting OpenVPN credentials...
adding route to local network 192.168.10.0/24 via 172.21.0.1 dev eth0
Options error: the --route-pre-down directive should have at most 1 parameter.  To pass a list of arguments as one of the parameters, try enclosing them in double quotes ("").
Use --help for more information.
Starting container with revision: 2c1f6102ec454003e980d6f64d60b6dc48c75bf8
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
INFO: OVPN: Checking curl installation
INFO: OVPN: DNS resolution ok
INFO: OVPN: ok, configurations download site reachable
INFO: OVPN: Removing existing configs in /etc/openvpn/nordvpn
Checking NORDPVN API responses
INFO: OVPN:Selecting the best server...
INFO: OVPN: Searching for country : DE (81)
INFO: OVPN: Searching for group: legacy_p2p
INFO: OVPN:Searching for technology: openvpn_udp
INFO: OVPN: Best server : de1064.nordvpn.com, load: 7
INFO: OVPN: Downloading config: de1064.nordvpn.com.ovpn
INFO: OVPN: Downloading from: https://downloads.nordcdn.com/configs/files/ovpn_udp/servers/de1064.nordvpn.com.udp.ovpn
Starting OpenVPN using config de1064.nordvpn.com.ovpn
Modifying /etc/openvpn/nordvpn/de1064.nordvpn.com.ovpn for best behaviour in this container
Modification: Point auth-user-pass option to the username/password file
Modification: Change ca certificate path
Modification: Change ping options
Modification: Update/set resolv-retry to 15 seconds
Modification: Change tls-crypt keyfile path
Modification: Set output verbosity to 3
Modification: Remap SIGUSR1 signal to SIGTERM, avoid OpenVPN restart loop
Modification: Updating status for config failure detection
Setting OpenVPN credentials...
adding route to local network 192.168.10.0/24 via 172.21.0.1 dev eth0
Options error: the --route-pre-down directive should have at most 1 parameter.  To pass a list of arguments as one of the parameters, try enclosing them in double quotes ("").
Use --help for more information.

...and then it just goes back to looping as it did before.

degudejung commented 1 year ago

Just in case anyone runs into the same issue, here's how I solved it in the end:

At some point in the past, the developers removed the definition of a second Docker volume mounting to :/config from the configuration. When composing/running without that volume defined, Docker will create a random, non-persistend volume to store the data. That in my case caused all the trouble. As soon as I manually (re-)configured that second volume, the container booted up and runs just fine, no matter whether I use :latest oder :dev image.

The section of my compose now looks like that:

[..]
        volumes:
            - transmission-data:/data
            - transmission-config:/config
volumes:
    transmission-data:
        external: true
    transmission-config:
        external: true
[..]