u/GLotsapot

Ubuntu Trackers not working through VPN

Ubuntu Trackers not working through VPN

Recently noticed that my qBittorrent 5.2.0 (Lib2) torrents for Ubuntu through GlueTUN (yes - actually a linux torrent) are getting "Connection Reset by peer" on their trackers. Very odd indeed as I have a 23391:1 ratio on one of them.

I tried downloading the same torrent on my Windows PC and it seems to work fine without a VPN.

Just wondering if anybody else can test to see if Ubuntu is specifically blocking connections from VPN providers.

https://ubuntu.com/download/alternative-downloads is the location to get them

u/GLotsapot — 25 days ago

Recently switched from PureVPN (that has a static port forward) to Proton VPN (which is dynamic one) in my docker compose configuration. (listed below for reference)

Theoretically should work fine.

  1. GlueTun starts up, and connects to VPN, figures out what the port is
  2. GlueTun runs an API command against qBT that sets the listening port
    • Also runs a different command when the VPN goes down

Here's the rub though: GlueTun comes up first cause qBitTorrent is dependant on it's network service.... but GlueTun can't set the port cause qBT isn't up yet. I basically have to start the stack, but then restart qBT when I see the GlueTun logs trying to connect to set the port.

Anybody have any idea's on how to get this to work together?

---
services:
  gluetun:
    image: qmcgaw/gluetun
    container_name: gluetun
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun:/dev/net/tun
    ports:
      # WebUI port for qBitTorrent
      - 8080:8080
    volumes:
      - ${BASE_LOC}/config/gluetun:/gluetun
    environment:
      - TZ=${TZ}
      - VPN_SERVICE_PROVIDER=protonvpn
      - VPN_TYPE=wireguard 
      - WIREGUARD_PRIVATE_KEY=REDACTED
      - PORT_FORWARD_ONLY=on
      - VPN_PORT_FORWARDING=on
      - VPN_PORT_FORWARDING_UP_COMMAND=/bin/sh -c 'wget -O- -nv --retry-connrefused --post-data "json={\"listen_port\":{{PORT}},\"current_network_interface\":\"{{VPN_INTERFACE}}\",\"random_port\":false,\"upnp\":false}" http://127.0.0.1:8080/api/v2/app/setPreferences'
      - VPN_PORT_FORWARDING_DOWN_COMMAND=/bin/sh -c 'wget -O- -nv --retry-connrefused --post-data "json={\"listen_port\":0,\"current_network_interface\":\"lo\"}" http://127.0.0.1:8080/api/v2/app/setPreferences'
    restart: on-failure:5

  qbittorrent:
    container_name: qbittorrent
    image: lscr.io/linuxserver/qbittorrent:latest
    environment:
      - UMASK=${UMASK_SET}
      - TZ=${TZ}
      - WEBUI_PORT=8080
    volumes:
      - ${BASE_LOC}/config/qbittorrent:/config
      - nas_data:/data
    restart: unless-stopped
    network_mode: "service:gluetun"
    deploy:
      resources:
        limits:
          memory: 8G
reddit.com
u/GLotsapot — 2 months ago