VPN with wireguard makes domain unreachable

HI @Daize

This whole topic is about using qbittorrent as a service with a VPN.

I would then first advice to see directly with bitorrent community https://forum.qbittorrent.org how to address such thing.

I don’t use qbittorrent so i won’t be able to give grounded by experience answers.

There is no easy thing as a VPN split per service.
Wireguard is a kernel level feature so to control it this is through ip table and that’s not easy.
Using allowedIPs defines destination network that will tunnel traffic.
I guess that qtbittorent can contact any address, so there is no dedicated destination network for it. default is just ‘all’ ( 0.0.0.0/0 == all ).

Here we would like more a Source ip to be the selector of such traffic, that would be the ip address bound to qbittorrent.
Even setting a dedicated address by service will require some setup, or even setting wireguard interface for this service.
There is a topic related to this Split Tunneling Wireguard Qbittorent but solution seems to not be working very well.

To go back to original quesiton, getting wireguard privacy with qbittorent was addressed using docker by this project GitHub - tenseiken/docker-qbittorrent-wireguard: Docker container which runs qBittorrent-nox (headless) client while connecting to WireGuard. · GitHub

didn’t dig in whole details but for what i see

the Qbittorrent conf explicitly set wireguard interface as its address :

Session\Interface=wg0

there is a bunch of ip table changes docker-qbittorrent-wireguard/qbittorrent/iptables.sh at master · tenseiken/docker-qbittorrent-wireguard · GitHub

there is some nat portforwarding specific script docker-qbittorrent-wireguard/qbittorrent/portfwd.sh at master · tenseiken/docker-qbittorrent-wireguard · GitHub

There might be docker related code that is fully irrelevant here, but in any case, this is not an easy task.