haugene/transmission-openvpn: Transmission not available after opening vpn connection

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • haugene/transmission-openvpn: Transmission not available after opening vpn connection

      Hi all,

      I am new with OpenMediaVault and I am following the tutorials from Techno Dad Life.
      Now i was following the "How to Install Transmission with VPN on Openmediavault 2019" tutorial, but I have a issue and i can't find the solution.

      If I start the container and go directly to <ip omv>:9091, the Transmission GUI is showed.
      If i hit F5 the page reloads until the VPN connection is established, than i loose the connection with Transmission.
      I have tried many things with the network settings, but I cannot get it working.

      What do i wrong?

      Raspberry Pi 4
      Used OMV image: OMV_4_Raspberry_Pi_2_3_3Plus_4.img.xz (4.1.23-1 Arrakis)

      Docker Engine - Community
      Version: 19.03.2
      API version: 1.40

      First i create mynet network
      docker network create mynet

      After that i start the container, and when the VPN connection comes up the transmission webpage is not reachable anymore

      Source Code

      1. docker run --cap-add=NET_ADMIN -d \
      2. --network mynet \
      3. --device=/dev/net/tun \
      4. -v /sharedfolders/Downloads/:/data:rw \
      5. -v /sharedfolders/AppData/Transmission/:/config:rw \
      6. -v /etc/localtime:/etc/localtime:ro \
      7. -e "CREATE_TUN_DEVICE=true" \
      8. -e "OPENVPN_PROVIDER=TIGER" \
      9. -e "OPENVPN_USERNAME=username" \
      10. -e "OPENVPN_PASSWORD=password" \
      11. -e "OPENVPN_OPTS=--inactive 3600 --ping 10 --ping-exit 60" \
      12. -e "WEBPROXY_ENABLED=true" \
      13. -e "LOCAL_NETWORK=192.168.1.0/24" \
      14. -e "PUID=1000" \
      15. -e "PGID=100" \
      16. -e "CREATE_TUN_DEVICE=true" \
      17. --log-driver json-file \
      18. --log-opt max-size=10m \
      19. -p 9091:9091 \
      20. --name transmission-openvpnx \
      21. haugene/transmission-openvpn:latest-armhf
      Display All

      Even when I do it through the OMV GUI I have the same problems

      The container log file:

      Brainfuck Source Code

      1. Using OpenVPN provider: TIGER
      2. No VPN configuration provided. Using default.
      3. Setting OPENVPN credentials...
      4. adding route to local network 192.168.1.0/24 via 172.17.0.1 dev eth0
      5. Mon Sep 9 22:45:22 2019 OpenVPN 2.4.0 arm-unknown-linux-gnueabihf [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Oct 14 2018
      6. Mon Sep 9 22:45:22 2019 library versions: OpenSSL 1.0.2r 26 Feb 2019, LZO 2.08
      7. Mon Sep 9 22:45:22 2019 NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
      8. Mon Sep 9 22:45:22 2019 TCP/UDP: Preserving recently used remote address: [AF_INET]37.252.248.92:1194
      9. Mon Sep 9 22:45:22 2019 UDP link local (bound): [AF_INET][undef]:1194
      10. Mon Sep 9 22:45:22 2019 UDP link remote: [AF_INET]37.252.248.92:1194
      11. Mon Sep 9 22:45:22 2019 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
      12. Mon Sep 9 22:45:22 2019 [tigervpn.com] Peer Connection Initiated with [AF_INET]37.252.248.92:1194
      13. Mon Sep 9 22:45:24 2019 TUN/TAP device tun0 opened
      14. Mon Sep 9 22:45:24 2019 do_ifconfig, tt->did_ifconfig_ipv6_setup=0
      15. Mon Sep 9 22:45:24 2019 /sbin/ip link set dev tun0 up mtu 1500
      16. Mon Sep 9 22:45:24 2019 /sbin/ip addr add dev tun0 100.97.0.29/16 broadcast 100.97.255.255
      17. Mon Sep 9 22:45:24 2019 /etc/openvpn/tunnelUp.sh tun0 1500 1553 100.97.0.29 255.255.0.0 init
      18. Up script executed with tun0 1500 1553 100.97.0.29 255.255.0.0 init
      19. Updating TRANSMISSION_BIND_ADDRESS_IPV4 to the ip of tun0 : 100.97.0.29
      20. Generating transmission settings.json from env variables
      21. sed'ing True to true
      22. Enforcing ownership on transmission config directories
      23. Applying permissions to transmission config directories
      24. Setting owner for transmission paths to 1000:100
      25. Setting permission for files (644) and directories (755)
      26. -------------------------------------
      27. Transmission will run as
      28. -------------------------------------
      29. User name: abc
      30. User uid: 1000
      31. User gid: 100
      32. -------------------------------------
      33. STARTING TRANSMISSION
      34. NO PORT UPDATER FOR THIS PROVIDER
      35. Transmission startup script complete.
      36. STARTING TINYPROXY
      37. Found config file /etc/tinyproxy/tinyproxy.conf, updating settings.
      38. Setting tinyproxy port to 8888
      39. Starting Tinyproxy lightweight HTTP proxy daemon: tinyproxy.
      40. Tinyproxy startup script complete.
      41. Mon Sep 9 22:45:29 2019 Initialization Sequence Completed
      Display All
    • I found something out.
      If the container is running and the VPN connection is up i lose the connection.
      If i run a cmd in the docker container "ip r" i see all routes

      0.0.0.0/1 via 100.97.0.1 dev tun0
      default via 172.17.0.1 dev eth0
      37.252.248.92 via 172.17.0.1 dev eth0
      100.97.0.0/16 dev tun0 proto kernel scope link src 100.97.0.32
      128.0.0.0/1 via 100.97.0.1 dev tun0
      172.17.0.0/16 dev eth0 proto kernel scope link src 172.17.0.3
      192.168.1.0/24 via 172.17.0.1 dev eth0

      if i remove 128.0.0.0/1 via 100.97.0.1 dev tun0 by run ip route del 128.0.0.0/1 via 100.97.0.1 dev tun0 the web interface from Transmission comes back!

      If i check the traffic in the container it is still using the VPN connection.
      curl ifconfig.co returns the WAN IP of the VPN connection.
      If i run the same command on the Raspberry Pi I get my own WAN IP, everything looks good sofar.

      But how can i fix the issue without having remove the route manually?