VPN killswitches aren’t reliable, the best way to avoid exposing your IP address is by binding the VPN network interface to the torrent client. This means that you’ll only be able to download/upload while the VPN tunnel is active, reducing the probability of having a leak to virtually zero.
Requirements: A torrent client that supports binding, eg. qBittorrent (Windows, macOS and Linux) or BiglyBT (Android). The instructions below are for qBittorrent.
Method 1
Open qBittorrent. Go to Preferences, and then Advanced tab.
Check for the differences on the “Network Interface” list when you connect/disconnect VPN (you may have to restart qBittorrent for the list to refresh).
Select (bind) the one that shows up/disappears from the previous test.
Restart qBittorrent.
Method 2
Windows
Start the VPN and connect to a location.
Open qBittorrent. Go to Preferences, and then Advanced tab.
Change Network interface to the VPN (usually its name, like “Mullvad”).
Restart qBittorrent.
macOS
Start the VPN and connect to a location.
Open the Terminal app (it’s in Applications/Utilities).
Run the command “ifconfig | grep -A 2 utun” (without “”)
Take note of the utun interface with the internal IP “inet 10.x.x.x” (eg. “utun3”).
Open qBittorrent. Go to Preferences, and then Advanced tab.
Change Network interface to the utun interface you found above.
Restart qBittorrent.
Note: The utun interface may change if you reboot or reconnect.
Linux
Start the VPN and connect to a location.
Open qBittorrent. Go to Preferences, and then Advanced tab.
Change Network interface to one of the following depending on the app and protocol you are using (Mullvad VPN as example)
Mullvad app using OpenVPN: tun0
Mullvad app using WireGuard kernel: wg-mullvad
Mullvad app using WireGuard userspace: tun0
WireGuard standalone: mlvd-xx
OpenVPN standalone: tun0
Restart qBittorrent.
How to test?
You can download the official Ubuntu 21.10 torrent and open it on qBittorrent. If the binding is properly set, the download will only start if the VPN is connected. If you disconnect, the download will stop.
or just connect your entire home network to a vpn server using a router, no leaks, it just works
I built a home router using vyos. My ISP sees nothing except traffic to the vpn server. When the tunnel goes down, all traffic stops, leaks are impossible, because I never enabled NAT onto the WAN, just the vpn tunnel. Really makes things easy.
It’s three years later but just wanted to say thanks for this! I had no idea I should bind my torrent client to my VPN. Just followed method two with Mullvad VPN and qBitorrent and it’s worked like a charm.
Check for the differences on the “Network Interface” list when you connect/disconnect VPN (you may have to restart qBittorrent for the list to refresh).
Just got myself Mullvad and the list never changes.
Mullvad: connected
Start Qbittorrent
List has 4 names in it.
Exit Qbittorrent
Disconnect Mullvad
Start Qbittorrent
List has 4 names in it still
Is just selecting Mullvad in the list fine and just as safe? I noticed when downloading the Ubuntu Torrent, when I kill the connection the download doesn’t stop immediately. It doesn’t go down from 20mb/s to 0mb/s in one moment, it slowly trickles down to 0 mb/s. Is that normal? Just a visual thing?