this post was submitted on 14 Jun 2023
10 points (100.0% liked)

qBittorrent

23 readers
1 users here now

Everything related to the qBittorrent

https://www.qbittorrent.org/

https://www.qbittorrent.org/donate


founded 1 year ago
MODERATORS
 

I'm trying to link a docker container qFlood to my VPN (proton) on the host to prevent IP leaks.

When everything is on the host, I can just choose "proton0" in the network interface to use, but I don't know how to do that inside the container because this interface is not exposed to the container.

Is there a way to do that?

Or even to implement the VPN inside a container?

What the alternative to prevent IP leaks with qBit on docker?

edit:

I used gluetun + qFlood as advised and it worked like a charmed except that I could't seed or leach at all

Turns out the solution was to change the network interface in qBittorrent options from eth0 to tun0… Simple as that

Thank you all for the help!

top 17 comments
sorted by: hot top controversial new old
[–] [email protected] 5 points 1 year ago* (last edited 1 year ago) (2 children)

Do you use docker compose?

https://www.youtube.com/watch?v=xbSfaKwyfXE&t=33s

version: '3.7'
services:
  gluetun:
    image: qmcgaw/gluetun:latest
    container_name: vpn
    cap_add:
      - NET_ADMIN
    ports:
      - '8080:8080'
    environment:
      - VPNSP=protonvpn
      - VPN_TYPE=openvpn
      - OPENVPN_USER=xxxxxx
      - OPENVPN_PASSWORD=xxxxxx
      - REGION=United States
    restart: unless-stopped
  qbittorrent:
    container_name: qbittorrent
    image: cr.hotio.dev/hotio/qbittorrent:latest
    network_mode: 'container:vpn'
    environment:
      - PUID=1000
      - PGID=1000
      - UMASK=002
      - TZ=America/New_York
    volumes:
      - '/home/xxxx/qbt:/config'
      - '/home/xxxx/INCOMING:/downloads'
    restart: unless-stopped

That should get your started

[–] [email protected] 1 points 1 year ago (1 children)

So I was wondering if you solved this?

If not, maybe try the qBittorrent image from LinuxServer instead?

I had your same problem that everything was stalled but switching to LinuxServer image fixed it :)

Also, I just had this issue as well, make sure you use port forwarding on whatever VPN you have!

I believe Gluetun has native support for Proton, so all you should need is to add "VPN_PORT_FORWARDING=on" to your environment on Gluetun container, and it will give you a port number. Put that port number in qBittorrent in the "Listening" port and you should be able to seed too! :)

Lemme know if you have any other questions, and I'll do my best to help :)

[–] [email protected] 2 points 1 year ago (1 children)

Hey ! Sorry I didn't saw your message. I came here to explain how I solved it (just now)!

I discovered a lot of nice option in gluetun (like port forwarding)

But turns out the solution was to change the network interface in qBittorrent options from eth0 to tun0... Simple as that

Thanks for your help!

[–] [email protected] 1 points 1 year ago

This is actually very helpful, maybe now I can seed to my private trackers! Lol

I've been having to use a seed box for those torrents.

So just to be clear, you set up Gluetun, port forwarding on Gluetun, set the port # on qBittorrent, AS WELL AS changing the adapter on qBittorrent?

[–] [email protected] 1 points 1 year ago (1 children)

I do

Thank you it's really helpful

I'll try it

[–] [email protected] 2 points 1 year ago (1 children)

awesome let me know if you run into any issues!

[–] [email protected] 1 points 1 year ago (2 children)

So it's seems to be working but all torrents are stalled for some reason

IP leaks can see their file and I can curl an IP from qflood container but somehow the torrent won't download

[–] [email protected] 1 points 1 year ago

strange. maybe try a different torrent client?

[–] [email protected] 1 points 1 year ago

So I was wondering if you solved this?

If not, maybe try the qBittorrent image from LinuxServer instead?

I had your same problem that everything was stalled but switching to LinuxServer image fixed it :)

Also, I just had this issue as well, make sure you use port forwarding on whatever VPN you have!

I believe Gluetun has native support for Proton, so all you should need is to add "VPN_PORT_FORWARDING=on" to your environment on Gluetun container, and it will give you a port number. Put that port number in qBittorrent in the "Listening" port and you should be able to seed too! :)

Lemme know if you have any other questions, and I'll do my best to help :)

[–] [email protected] 4 points 1 year ago (1 children)

I'm not sure about containers, but in Qbittorrent, Settings, Advanced, there is a "Network Interface" setting you can use to force qbit to only use a particular network interface. My VPN has it's own network interface, so if it drops out, qbittorrent just stops downloading until the VPN comes back up. So, no IP leaks. Hopefully this helps you out a bit!

[–] [email protected] 2 points 1 year ago

Thank you

I know the option but the network interface of the vpn is not accessible by the container.

I'm trying to have this interface listed in the setting you mentioned

[–] [email protected] 3 points 1 year ago (1 children)

Assuming you want OpenVPN you can use binhex/arch-qbittorrentvpn

[–] [email protected] 2 points 1 year ago (2 children)

Thank you

So I read quickly and from what I understand I can generate a wiregard configuration file for example and provide it to this container, thus setting the network directly to the container.

Am I understanding it correctly?

[–] [email protected] 3 points 1 year ago

I can share my docker-compose later if you want. In short -

you spin up your torrent container and vpn container

you expose torrent ports on the vpn container

you set the networking to route the torrent container to the vpn container

[–] [email protected] 1 points 1 year ago

That's the gist of it. Although I'm not sure if it supports Wireguard. You'd want to check the readme first.

[–] [email protected] 2 points 1 year ago

My VPN client runs on another container, and I just tell my qbittorrent container go use network of my VPN container via a docker command during qbittorrent container creation

load more comments
view more: next ›