haugene / docker-transmission-openvpn

Docker container running Transmission torrent client with WebUI over an OpenVPN tunnel
GNU General Public License v3.0
4.03k stars 1.21k forks source link

DNS problem #2836

Open MrAurel opened 1 month ago

MrAurel commented 1 month ago

Is there a pinned issue for this?

Is there an existing or similar issue/discussion 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?

Docker run config used

version: '3.3' services: transmission-openvpn: cap_add:

Current Behavior

Cannot start

Expected Behavior

Start

How have you tried to solve the problem?

I see the pinned post #2410 but it cannot resolve my problem

Log output

Starting container with revision: 07f5a2b9aea5028c9bb75438c1552708e91dde71 TRANSMISSION_HOME is currently set to: /config/transmission-home /etc/openvpn/start.sh: line 51: 10 Aborted (core dumped) nslookup ${HEALTH_CHECK_HOST:-"google.com"} > /dev/null 2>&1 WARNING: initial DNS resolution test failed 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 /etc/openvpn/nordvpn/..

HW/SW Environment

- OS:DSM 7
- Docker:26.1.1

Anything else?

No response

pkishino commented 1 month ago

Any reason you didn’t post the whole log?

pilotman28 commented 1 month ago

I'm having the same problem.

Starting container with revision: 07f5a2b9aea5028c9bb75438c1552708e91dde71 TRANSMISSION_HOME is currently set to: /config/transmission-home WARNING: Deprecated. Found old default transmission-home folder at /data/transmission-home, setting this as TRANSMISSION_HOME. This might break in future versions. We will fallback to this directory as long as the folder exists. Please consider moving it to /config/transmission-home Creating TUN device /dev/net/tun Using OpenVPN provider: PRIVADO Running with VPN_CONFIG_SOURCE auto No bundled config script found for PRIVADO. Defaulting to external config Will get configs from https://github.com/haugene/vpn-configs-contrib.git Repository is already cloned, checking for update Already up to date. Already on 'main' Your branch is up to date with 'origin/main'. Found configs for PRIVADO in /config/vpn-configs-contrib/openvpn/privado, will replace current content in /etc/openvpn/privado No VPN configuration provided. Using default. Modifying /etc/openvpn/privado/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 Modification: Updating status for config failure detection Setting OpenVPN credentials... adding route to local network 10.0.2.0/24 via 172.17.0.1 dev eth0 2024-05-22 10:52:02 DEPRECATED OPTION: --cipher set to 'AES-256-CBC' but missing in --data-ciphers (AES-256-GCM:AES-128-GCM). Future OpenVPN version will ignore --cipher for cipher negotiations. Add 'AES-256-CBC' to --data-ciphers or change --cipher 'AES-256-CBC' to --data-ciphers-fallback 'AES-256-CBC' to silence this warning. 2024-05-22 10:52:02 OpenVPN 2.5.9 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Sep 29 2023 2024-05-22 10:52:02 library versions: OpenSSL 3.0.2 15 Mar 2022, LZO 2.10 2024-05-22 10:52:02 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts 2024-05-22 10:52:02 RESOLVE: Cannot resolve host address: ams-005.vpn.privado.io:1194 (Name or service not known) 2024-05-22 10:52:02 RESOLVE: Cannot resolve host address: ams-005.vpn.privado.io:1194 (Name or service not known)

jrlambs commented 3 weeks ago

I had this same issue (specifically with privado, and the exact same url). that appears to be the default config, but they have a bunch of other servers. I went to privado's site and had it generate an ovpn file for me.. when I opened it up it gave me a different url to use. specifically atl-007.vpn.privado.io (but I think it was based on a location I selected). anyway... I then found this documentation about setting the OPENVPN_CONFIG env variable. you can use the variable to select which available config for your provider you want to use.

basically I just added this line to my docker-compose file under environment variables and now it works.

OPENVPN_CONFIG=atl-007

Documentation here: https://haugene.github.io/docker-transmission-openvpn/run-container/

The documentation walks you through how you can figure out what options are available to put in that spot for your vpn provider. Look at #2 under "Things to Remember"

jhaury commented 1 week ago

... I went to privado's site and had it generate an ovpn file for me.. when I opened it up it gave me a different url to use. specifically atl-007.vpn.privado.io (but I think it was based on a location I selected). anyway... I then found this documentation about setting the OPENVPN_CONFIG env variable. you can use the variable to select which available config for your provider you want to use.

basically I just added this line to my docker-compose file under environment variables and now it works.

OPENVPN_CONFIG=atl-007

You are my hero! My transmission has been down for a minute and this was the fix. I did the same thing, I went to Privado's website and logged in and created an ovpn file and extracted the server from the file. Mine was dfw-062 (Dallas).

Many thanks!

pilotman28 commented 1 week ago

There is a script which is provided with the image to help with this. The script is located at, 'config/vpn-configs-contrib/openvpn/privado/updateConfigs.sh'. The only customization necessary here is to change which '.opvn' file is symlinked to 'default.opvn' to be whatever you wish. I'll submit a code change to the shell script to take an argument if given to make it easily changed but in the mean time the shell script can be modified directly to be to your liking, 'ln -s atl-007.opvn default.ovpn' in my case.