haugene / docker-transmission-openvpn

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

Cannot access Transmission from WAN #1720

Closed derekcentrico closed 3 years ago

derekcentrico commented 3 years ago

Before creating this issue I have:

Describe your request

I'm learning docker and converting my old setup over. So far so good with one hiccup: I cannot access Transmission from WAN anymore. Port is forwarded still. It just spins until it times out. I believe I setup the container fine as it certainly forwards incoming LAN traffic to the container as I can access the WEBUI with no issue from LAN. I reviewed some other requests here and I seem to have the same configuration so I don't know what's off.

Contextual information

Here's the container file:

  transmission-vpn:
    container_name: transmission-vpn
    hostname: transmission
    image: haugene/transmission-openvpn
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun
    restart: always
    ports:
    - "9091:9091"
    dns:
      - 1.1.1.1
      - 8.8.8.8
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - REDACTED:/data/completed/tvshows
      - REDACTED/DockerDownloads/Watch:/data/watch
      - REDACTED/Incomplete:/data/incomplete
      - ${USERDIR}/docker/shared:/shared
    environment:
      - OPENVPN_PROVIDER=NORDVPN
      - OPENVPN_USERNAME=REDACTED
      - OPENVPN_PASSWORD=REDACTED
      - NORDVPN_CATEGORY=legacy_p2p
      - NORDVPN_COUNTRY=US
      - NORDVPN_PROTOCOL=udp
      - OPENVPN_OPTS=--inactive 3600 --ping 15 --ping-exit 60
      - LOCAL_NETWORK=192.168.1.0/24
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
      - TRANSMISSION_RPC_AUTHENTICATION_REQUIRED=true
      - TRANSMISSION_RPC_HOST_WHITELIST="*.*.*.*"
      - TRANSMISSION_RPC_PASSWORD=REDACTEDHASH
      - TRANSMISSION_RPC_USERNAME=admin
      - TRANSMISSION_UMASK=002
      - TRANSMISSION_RATIO_LIMIT=0
      - TRANSMISSION_RATIO_LIMIT_ENABLED=true
      - TRANSMISSION_SEED_QUEUE_ENABLED=true
      - TRANSMISSION_SEED_QUEUE_SIZE=1
      - TRANSMISSION_TRASH_ORIGINAL_TORRENT_FILES=true
      - TRANSMISSION_ADDED_TORRENTS=true
      - TRANSMISSION_BLOCKLIST_URL="REDACTED"
      - TRANSMISSION_BLOCKLIST_ENABLED=true
      - TRANSMISSION_BLOCKLIST_UPDATES_ENABLED=true
      - TRANSMISSION_ENCRYPTION=2
      - TRANSMISSION_UTP_ENABLED=true
      - TRANSMISSION_DHT_ENABLED=true
      - TRANSMISSION_PEX_ENABLED=true
      - TRANSMISSION_INCOMPLETE_DIR=/data/incomplete
      - TRANSMISSION_INCOMPLETE_DIR_ENABLED=true
      - TRANSMISSION_WATCH_DIR=/data/watch
      - TRANSMISSION_WATCH_DIR_ENABLED=true
      - TRANSMISSION_DOWNLOAD_DIR=/data/completed/tvshows
      - TRANSMISSION_ALT_SPEED_DOWN=5000
      - TRANSMISSION_ALT_SPEED_ENABLED=true
      - TRANSMISSION_ALT_SPEED_UP=2
      - TRANSMISSION_ALT_SPEED_TIME_BEGIN=1360
      - TRANSMISSION_ALT_SPEED_TIME_DAY=127
      - TRANSMISSION_ALT_SPEED_TIME_ENABLED=true
      - TRANSMISSION_ALT_SPEED_TIME_END=540
      - TRANSMISSION_SPEED_LIMIT_DOWN=4000
      - TRANSMISSION_SPEED_LIMIT_DOWN_ENABLED=true
      - TRANSMISSION_SPEED_LIMIT_UP=1
      - TRANSMISSION_SPEED_LIMIT_UP_ENABLED=true

Any input on what is wrong, or if my expectations are just not correct, would be much appreciated. I'm a container newbie here. Thanks.

derekcentrico commented 3 years ago

Actually, im wondering if LOCAL_NETWORK=192.168.1.0/24 should be like 0.0.0.0/0 or something. And if so will data still go through the vpn or if that opens it up to the world for torrent data transfer.

sorcierwax commented 3 years ago

Hello,

I think you're good with LOCAL_NETWORK=192.168.1.0/24 but I guess that you need a reverse proxy to be able to access WebUI from WAN. I've got mine working with a new container with this image: haugene/transmission-openvpn-proxy, here is how I run it :

docker run -d --link transmissionvpn:transmission --name=proxy -p 8080:8080 haugene/transmission-openvpn-proxy:latest-armhf

So now when I point to http://(external IP):8080 -> BAM ! WebUI :)

derekcentrico commented 3 years ago

Okay so I added this to my docker-compose and reloaded. Sadly I'm not getting through on WAN. "This site can't be reached" when using IP:9090 as the entry point.

proxy: image: haugene/transmission-openvpn-proxy links:

derekcentrico commented 3 years ago

@sorcierwax what's your container for transmission itself? I'm wondering if I'm just not understanding how the port side works here.

derekcentrico commented 3 years ago

Ah!, okay so apparently 8080:8080 is obligatory. I changed it because of a conflict. However, I've now put proxy on that and changed the other docker file and we're solid. Sweet! Thanks for pointing me in this direction.

sorcierwax commented 3 years ago

šŸ‘

andsoitgoes commented 2 years ago

Sorry to necro this but considering I'm having the same issue, I hope it's okay.

I just want to clarify, do I need to use the proxy to REPLACE the original docker transmission container? Or can I run this proxy and tack it onto the existing transmission?

Meaning, do I just append my current docker script and replace the title to have it load the proxy install?

Thanks to everyone, and again sorry to bring this back from the dead.

sorcierwax commented 2 years ago

The proxy is a separate container from the Transmission one.

andsoitgoes commented 2 years ago

The proxy is a separate container from the Transmission one.

Okay, that makes sense - But when I try to link it, I constantly get an error saying, well, this:

sudo docker run -d \
>       --link transmission-openvpn:transmission \
>       -p 8080:8080 \
>       haugene/transmission-openvpn-proxy
docker: Error response from daemon: could not get container for transmission-openvpn: No such container: transmission-openvpn.
See 'docker run --help'.
sorcierwax commented 2 years ago

The argument right after --link should be the exact name of your transmission container.

andsoitgoes commented 2 years ago

The argument right after --link should be the exact name of your transmission container.

omfg I'm an idiot.

So okay, I fixed that. Only issue is I realized I have an apache server running so port 8080 is already bound, so I switched it to 8081 and it just... same problem

I double checked and I've got port forwarding enabled through that port to my Pi running transmission, too.

sorcierwax commented 2 years ago

I think that the proxy can only work on 8080 port. I too also tried to bind to another one but it won't work, I had to rollback to 8080.

andsoitgoes commented 2 years ago

Oh sweet baby rays it's working FINALLY.

Jesus that was a lot... had to switch Homebridge off, stupidly thought it was Portainer so I had to recreate that...

FUN TIMES I love computers =/

Anyway, thanks for everything, it's working now and my life is apparently complete until I find more ways to waste money and/or time.

sorcierwax commented 2 years ago

šŸ¤Ÿ