How can you make sure that you never accidentally have your torrent client on but your VPN off? You can restrict the network interface that your torrent client uses to that of your VPN.
To ensure privacy while torrenting legal content, you’ve probably heard the endless ads on podcasts and Youtube for using a VPN. This article assumes you already have a VPN and know how to turn it on and off.
A network interface is the point of connection between a computer and a network that may be connected to the rest of the world. Your VPN will have its own dedicated network interface, and for some torrent clients, you can specify to only ever use that network interface for torrent traffic.
First, find the network interface used by your VPN as follows:
- Turn off your torrent client and VPN.
- Open a terminal (Terminal App on MacOS, Command Prompt for Windows).
- Run
ifconfig
(oripconfig
for Windows). - The short names on the left of the output are your network interfaces. For example,
lo0
below.
❯ ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
- Turn on your VPN.
- Run
ifconfig
(oripconfig
) again. There should be a new network interface that wasn’t present before. That is the network interface for your VPN. Note down the name of that new network interface.
Now time to tell your torrent client to only ever use that network interface. Note that not all torrent clients support this action. I’ll show the process for qBittorrent, which does support it.
- Turn on your VPN.
- Open qBittorrent, then open its Preferences.
- Go to “Advanced”.
- Under the setting Network Interface, select the network interface name used by your VPN and hit “OK”.
Torrent traffic will now only flow if your VPN is on and connected.