Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Torrenting over VPN in Docker
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Torrenting over VPN in Docker

adnsadns Member
edited June 2022 in Help

Hello LET!

I'm a silent reader of LET but currently I got stuck in a problem.

i'd like to use a VPS as a lightweight seedbox over my local router with wireguard.

I made a working tunnel, so on the VPS, I have a wg0 interface with IP 172.20.0.1 and my router is 172.20.0.2.

I'd like use gists/qbittorrent Docker container on Debian to leech and seed torrents over my network. Firstly, I created a lookup table for this task
echo "200 home" >> /etc/iproute2/rt_tables
And I made a default route
ip route add default via 172.20.0.2 dev wg0 0 table home
Finaly, a rule to route the traffic to the tunnel
ip rule add from 172.29.0.0/24 table home priority 200

After that, I created a Docker network that's subnet is 172.29.0.0/24
docker network create --subnet 172.29.0.0/20 home

When I run a Debian container in this network, I can use wget, traceroute and others over my network.
But my problem is, when I start the qBittorrent container, I can't access the webui from my local network. I performed the appropriate LAN rules. When I delete the upper ip rule, I can access the webui, but if this rule exists, Chrome can't load js files from qBittorrent webui.

Have any idea what might be the problem? I'm openminded for any other solution to solve my problem, that is I'd like torrenting only over my VPN tunnel with qBittorrent.

Comments

  • darkimmortaldarkimmortal Member
    edited June 2022

    Follow a guide to run WireGuard in a network namespace, then set NetworkNamespacePath to it in your torrent client systemd service config

    Or for a more docker-like approach without using that cancerware, create a systemd-nspawn container and install WireGuard and your torrent client inside it.

    I use the second approach as it nicely solves the problem you encountered with inability to access the web UI - just have it listen on the nspawn NAT address and setup a proxy on the host system

    Thanked by 1yoursunny
  • you want to use your vps as a seedbox and connect to it from your local network at home? install transmission-daemon on the vps and install "transmission remote gui" on the local pc. no need for vpn.

    Thanked by 1default
  • devpdevp Member

    @adns said: I'm a silent reader of LET

    Appreciated.

  • BetaMasterBetaMaster Member
    edited June 2022

    Playing with iptables can be pain in the ass. You cannot access your webui because your VPS connection was routed to VPN network which probably caused by incorrect setting on iptables. Use docker image such as https://github.com/binhex/arch-qbittorrentvpn instead. Have no problem with it for years.

    Thanked by 1Arkas
  • adnsadns Member

    Thank you for the usefull replies! I'll try namespace and the linked Docker image:)

  • defaultdefault Veteran
    edited June 2022

    Torrenting should be simple. Why complicate it with Docker and VPN? If you have a seedbox, just use it as a Linux seedbox, without VPN or Docker.

    If you want to go cheaper than using a VPS, you can order a seedbox already prepared for you. @PulsedMedia is a low-end provider of such things.

    Thanked by 1PulsedMedia
  • PulsedMediaPulsedMedia Member, Patron Provider

    Yea you don't need to mess with docker + VPNs when using a Seedbox at all.

    Thanks for the ping @default

Sign In or Register to comment.