haugene / docker-transmission-openvpn

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

Can't connect to UI but container is connected to the VPN #2770

Closed RobinFrcd closed 10 months ago

RobinFrcd commented 10 months 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

transmission-openvpn:
  container_name: transmission
  cap_add:
      - NET_ADMIN
  volumes:
      - '~/Documents/media-server/transmission:/config'
      - '~/Documents/media-server/transmission/default-config:/etc/openvpn/custom/'
  environment:
      - OPENVPN_PROVIDER=custom
      - OPENVPN_CONFIG=france
      - OPENVPN_USERNAME=XXXX
      - OPENVPN_PASSWORD=XXXX
      - LOCAL_NETWORK=192.168.0.0/16
  logging:
      driver: json-file
      options:
          max-size: 10m
  ports:
      - '9091:9091'
  image: haugene/transmission-openvpn

Current Behavior

The container starts successfully with:

STARTING TRANSMISSION
Transmission startup script complete.
2023-12-17 22:44:37 Initialization Sequence Completed

But http://localhost:9091 loads forever on host machine

Expected Behavior

http://localhost:9091 should be rechable

How have you tried to solve the problem?

Checked I run the latetest version of the docker image, tried another profile, checked docker exec -it transmission curl ipinfo.io returns the VPN's IP.

Log output

docker logs -f transmission                                         
Starting container with revision: 07f5a2b9aea5028c9bb75438c1552708e91dde71
TRANSMISSION_HOME is currently set to: /config/transmission-home
Creating TUN device /dev/net/tun
Using OpenVPN provider: CUSTOM
Modifying /etc/openvpn/custom/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 192.168.0.0/16 via 172.18.0.1 dev eth0
2023-12-17 22:44:36 OpenVPN 2.5.9 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Sep 29 2023
2023-12-17 22:44:36 library versions: OpenSSL 3.0.2 15 Mar 2022, LZO 2.10
2023-12-17 22:44:36 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
2023-12-17 22:44:36 Outgoing Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
2023-12-17 22:44:36 Outgoing Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
2023-12-17 22:44:36 Incoming Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
2023-12-17 22:44:36 Incoming Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
2023-12-17 22:44:36 TCP/UDP: Preserving recently used remote address: [AF_INET]146.70.194.66:4569
2023-12-17 22:44:36 Socket Buffers: R=[212992->212992] S=[212992->212992]
2023-12-17 22:44:36 UDP link local: (not bound)
2023-12-17 22:44:36 UDP link remote: [AF_INET]146.70.194.66:4569
2023-12-17 22:44:36 TLS: Initial packet from [AF_INET]146.70.194.66:4569, sid=0d8d2f03 2fde24e9
2023-12-17 22:44:36 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
2023-12-17 22:44:36 VERIFY OK: depth=2, C=CH, O=Proton Technologies AG, OU=ProtonVPN, CN=ProtonVPN Root CA
2023-12-17 22:44:36 VERIFY OK: depth=1, C=CH, O=ProtonVPN AG, CN=ProtonVPN Intermediate CA 1
2023-12-17 22:44:36 VERIFY KU OK
2023-12-17 22:44:36 Validating certificate extended key usage
2023-12-17 22:44:36 ++ Certificate has EKU (str) TLS Web Client Authentication, expects TLS Web Server Authentication
2023-12-17 22:44:36 ++ Certificate has EKU (oid) 1.3.6.1.5.5.7.3.2, expects TLS Web Server Authentication
2023-12-17 22:44:36 ++ Certificate has EKU (str) 1.3.6.1.5.5.8.2.2, expects TLS Web Server Authentication
2023-12-17 22:44:36 ++ Certificate has EKU (oid) 1.3.6.1.5.5.8.2.2, expects TLS Web Server Authentication
2023-12-17 22:44:36 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
2023-12-17 22:44:36 VERIFY EKU OK
2023-12-17 22:44:36 VERIFY OK: depth=0, CN=node-fr-19.protonvpn.net
2023-12-17 22:44:36 WARNING: 'link-mtu' is used inconsistently, local='link-mtu 1549', remote='link-mtu 1541'
2023-12-17 22:44:36 WARNING: 'auth' is used inconsistently, local='auth [null-digest]', remote='auth SHA1'
2023-12-17 22:44:36 WARNING: 'keysize' is used inconsistently, local='keysize 256', remote='keysize 128'
2023-12-17 22:44:36 Control Channel: TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, peer certificate: 4096 bit RSA, signature: RSA-SHA256
2023-12-17 22:44:36 [node-fr-19.protonvpn.net] Peer Connection Initiated with [AF_INET]146.70.194.66:4569
2023-12-17 22:44:37 SENT CONTROL [node-fr-19.protonvpn.net]: 'PUSH_REQUEST' (status=1)
2023-12-17 22:44:37 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1,explicit-exit-notify,dhcp-option DNS 10.96.0.1,sndbuf 524288,rcvbuf 524288,route-gateway 10.96.0.1,topology subnet,ping 10,ping-restart 60,socket-flags TCP_NODELAY,ifconfig 10.96.0.9 255.255.0.0,peer-id 786439,cipher AES-256-GCM'
2023-12-17 22:44:37 OPTIONS IMPORT: timers and/or timeouts modified
2023-12-17 22:44:37 OPTIONS IMPORT: explicit notify parm(s) modified
2023-12-17 22:44:37 OPTIONS IMPORT: --sndbuf/--rcvbuf options modified
2023-12-17 22:44:37 Socket Buffers: R=[212992->425984] S=[212992->425984]
2023-12-17 22:44:37 OPTIONS IMPORT: --socket-flags option modified
2023-12-17 22:44:37 NOTE: setsockopt TCP_NODELAY=1 failed
2023-12-17 22:44:37 OPTIONS IMPORT: --ifconfig/up options modified
2023-12-17 22:44:37 OPTIONS IMPORT: route options modified
2023-12-17 22:44:37 OPTIONS IMPORT: route-related options modified
2023-12-17 22:44:37 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
2023-12-17 22:44:37 OPTIONS IMPORT: peer-id set
2023-12-17 22:44:37 OPTIONS IMPORT: adjusting link_mtu to 1624
2023-12-17 22:44:37 OPTIONS IMPORT: data channel crypto options modified
2023-12-17 22:44:37 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
2023-12-17 22:44:37 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
2023-12-17 22:44:37 net_route_v4_best_gw query: dst 0.0.0.0
2023-12-17 22:44:37 net_route_v4_best_gw result: via 172.18.0.1 dev eth0
2023-12-17 22:44:37 ROUTE_GATEWAY 172.18.0.1/255.255.0.0 IFACE=eth0 HWADDR=02:42:ac:12:00:06
2023-12-17 22:44:37 TUN/TAP device tun0 opened
2023-12-17 22:44:37 net_iface_mtu_set: mtu 1500 for tun0
2023-12-17 22:44:37 net_iface_up: set tun0 up
2023-12-17 22:44:37 net_addr_v4_add: 10.96.0.9/16 dev tun0
2023-12-17 22:44:37 net_route_v4_add: 146.70.194.66/32 via 172.18.0.1 dev [NULL] table 0 metric -1
2023-12-17 22:44:37 net_route_v4_add: 0.0.0.0/1 via 10.96.0.1 dev [NULL] table 0 metric -1
2023-12-17 22:44:37 net_route_v4_add: 128.0.0.0/1 via 10.96.0.1 dev [NULL] table 0 metric -1
Up script executed with device=tun0 ifconfig_local=10.96.0.9
Updating TRANSMISSION_BIND_ADDRESS_IPV4 to the ip of tun0 : 10.96.0.9

-------------------------------------
Transmission will run as
-------------------------------------
User name:   root
User uid:    0
User gid:    0
-------------------------------------

Updating Transmission settings.json with values from env variables
Attempting to use existing settings.json for Transmission
Successfully used existing settings.json /config/transmission-home/settings.json
Overriding bind-address-ipv4 because TRANSMISSION_BIND_ADDRESS_IPV4 is set to 10.96.0.9
Overriding download-dir because TRANSMISSION_DOWNLOAD_DIR is set to /data/completed
Overriding incomplete-dir because TRANSMISSION_INCOMPLETE_DIR is set to /data/incomplete
Overriding rpc-password because TRANSMISSION_RPC_PASSWORD is set to [REDACTED]
Overriding rpc-port because TRANSMISSION_RPC_PORT is set to 9091
Overriding rpc-username because TRANSMISSION_RPC_USERNAME is set to 
Overriding watch-dir because TRANSMISSION_WATCH_DIR is set to /data/watch
sed'ing True to true
STARTING TRANSMISSION
Transmission startup script complete.
2023-12-17 22:44:37 Initialization Sequence Completed

HW/SW Environment

- OS: Ubuntu 22.04
- Docker: Docker version 24.0.7, build afdd53b
- Image : haugene/transmission-openvpn                                        latest                       7a8b838bc13c   9 days ago     349MB

Anything else?

No response

pkishino commented 10 months ago

Please read the documentation and use the search feature in issues.. your local network is most certainly incorrect

RobinFrcd commented 10 months ago

My devices are in 192.168.1.0/24 so I'm in range with LOCAL_NETWORK=192.168.0.0/16. Anyway, I wanted to use proton VPN FR but now it's merged it just works with:

OPENVPN_PROVIDER=PROTONVPN
OPENVPN_CONFIG=fr.protonvpn.net.udp

So I can't say that this issue is fixed, but I managed to make it run fine. So, thanks ! :pray: