Is it possible to use a VPN split tunnel for qbittorrent?

Hello. I’m extremely new to Raspberry Pi and Linux so sorry if I come off as clueless.

When I first got my pi, I was planning on hosting a media server (Jellyfin), a VPN (preferably WireGuard), and qbittorrent at the same time. I thought I wouldn’t have any issues but when it came to setting up WireGuard, I was completely lost. Connecting to the .conf files that were given by the VPN provider gave to me should be pretty simple. Split tunneling is where the challenge came in. I’ve been searching for around a week if there was any way to split tunnel on certain applications such as qbittorrent. Is it harder to implement on the WireGuard client compared to VPN providers official client? All the guides out there seem to only be for setting up a home-hosted VPN and not using a client VPN. I want to be able to ssh and access my Jellyfin server on my home IP and have it be protected when running qbittorrent. Is this possible? Thank you.

A similar topic. Running the VPN on a dedicated router, e.g with OpenWrt, gives you more flexibility from the tools available.

Hi, I’m trying to setup my raspberry pi to route only and all traffic from qBittorrent through a VPN.

Right know I’ve tried using namespaces but every guide I’ve found is different and I can’t seem to get one to work. I have installed both OpenVPN and Wireguard so either one is ok.

What I would also like is to be able to reach qBittorrents webui from my local network.

An alternative solution for me would be to allow connections to the Apache server I host on the raspberry from outside the VPN. My main problem is that if I route all traffic through the VPN the servers answers that way and I’m not able to visit the webpage.

I’m using PureVPN’s VPN for Linux.

I’ve tried this guide that seemed like the easiest to implement but the namespace is not created as expected.

The clients that vpn providers offer will usually route all traffic over the tunnel. Since this is not the desired behaviour consider terminating the tunnel on an OpenWrt and use its tools to selectively route the interesting traffic only over the tunnel.