I use qbittorrent with gluetun for torrenting. For checking whether the von connection is working as expected, I usually use something like http://checkmyip.torrentprivacy.com/ or whatever pops up on google. It does the job.
Is that the only way or is there a more reliable way to check/monitor this that you guys are using?
I’ve wondered the same. I usually just docker exec into the container I want to check and run curlhttp://ipecho.net/plain; echo. That will return the external ip. I also double-check /etc/resolv.conf to see which nameservers are being used.
Just bind your VPNs network interface to qbittorrent. This way if your vpn crashes or goes down or whatever, then qbittorent is not able to connect in any another way by any connection on your network other than that VPN interface
In qbittorent go to settings, advanced, and look for network interface.
I have tested this with (linux ISOs), and turned off my VPN. Traffic stops cold.
I dont use a killswitch. I run my torrents in a FreeBSD jail with IPFW (just what I use, but you can also use pf or ipf) rules that only allows VPN traffic and blocks everything as soon as VPN connection cuts off.
I tested it in a few ways:
Disconnect the VPN and see if download rate drops to 0.
The second step checks both my external IP and if there are any DNS leaks.
Also, this works for any traffic, not just torrents. In the beginning, I discovered that it worked so well it even blocked my LAN traffic. I’ve put in some exceptions for LAN traffic rules so it still allows me to SSH into it.
I am lazy, I use vpnetmon. It has switches to run what every app you want. If vpn breaks, it turns off app. Has worked for years now. I am sure there are better ways to do it.
I started with that approach.
Later I moved to my current method involving “gluetun” as the vpn tunnel container, with the intention of using it for all containers that might need a vpn connection.
Several months later, I still don’t doubt this new approach. But I haven’t found the need to use any other services besides a torrent downloader that needs a vpn connection to a remote public vpn.
Yep; I got so paranoid of ISP emails that I bound mine to the specific VPN tun interface and current session IP. Would take a restart if the VPN disconnected but it wasn’t that bad.
That said, it was still uhh pretty dumb I think haha. Just binding qBT to the VPN interface like you said shouldn’t ever give you issues.
Edit: This comment gives a pretty concise rundown of what to do.
If you don’t trust gluetun’s kill-switch then just bind the network interface of your torrent service to the gluetun VPN tunnel such that it literally can’t use another connection.
In qbittorrent this is as simple as selecting “tun0” in the settings