Configure qBittorrent to block transfers on VPN disconnect - gHacks Tech News

Configure qBittorrent to block transfers on VPN disconnect

If you are using a virtual private network while downloading torrents, then you may be interested in an option that qBittorrent makes available that blocks transfers automatically if the VPN connection drops.

VPNs are useful to improve your privacy on the Internet but like any other connection, they may disconnect from time to time.

While some services come with kill switches that prevent data transfers until the VPN connection has been established again, it is not the case for all and usually only available if you use a program provided by the VPN to connect to it but not if you use the operating system's build-in functionality to do so.

qBittorrent and VPNs

qbittorrent kill connection

One feature of qBittorrent, a popular cross-platform torrent client, is such a kill switch. Basically, what it does, is monitor a specific network connection to block all file transfers (up and down) if the network connection changes.

This can be useful to block torrent traffic if the connection to the VPN terminates, but also for other things like making sure that torrents are only downloaded or uploaded when the device is connected to a specific network adapter (say only when it is connected to Ethernet and not Wifi).

Here is what you need to do to configure the feature:

First thing you need to do is find out how the network connection / adapter that you want qBittorrent to use exclusively is named.

If you know that already, skip the following step.

  1. Use Windows-Pause to open the Windows Control Panel.
  2. Select Control Panel Home on the screen that opens.
  3. Select Network and Internet from the selection menu.
  4. Click on Network and Sharing Center on the next page.
  5. Select change adapter settings.
  6. There you find listed all network connections. Identify the one used by the VPN.

Once you know the name of the network connection, you may set up qBittorrent to use it exclusively.

  1. Open the qBittorrent program on your system.
  2. Select Tools > Options, or use the shortcut Ctrl-O to do the same.
  3. Switch to the advanced listing.
  4. Scroll down until you find "network interface" listed as a setting.
  5. Click on "any interface", and switch the value to the network connection you have identified previously.
  6. Click apply and ok.
  7. Restart qBittorrent.

It may be a good idea to test the setting to make sure it works correctly. What you can do is use a different connection, e.g. no vPN connection and start the program to see if traffic is blocked. Or, and that may be even better, start qBittorrent connected to the exclusive network connection you have configured, and terminate that connection after a moment to see if the BitTorrent client will block all traffic. (Thanks Don)

 

Summary
Configure qBittorrent to block transfers on VPN disconnect
Article Name
Configure qBittorrent to block transfers on VPN disconnect
Description
Find out how to configure qBittorrent to use a network connection exclusively, for instance to make sure that it will always use a VPN connection for torrenting.
Author
Publisher
Ghacks Technology News
Logo

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:

Comments

  1. DV said on March 23, 2016 at 3:14 pm
    Reply

    I’d be interesting in configuring Transmission the same way on a VPS.

  2. peter said on March 23, 2016 at 4:47 pm
    Reply

    I tried to get this to work on Xubuntu 15.10 without any success. It just kept downloading regardless of the interface setting.

    Aparrently it was a bug that was fixed in version 3.2.5. Meanwhile, Ubuntu’s repositories are still stuck at 3.2.3. One way to get a recent version is through the qbittorrent PPA:
    https://launchpad.net/~qbittorrent-team/+archive/ubuntu/qbittorrent-stable

    Now it works for me. Thanks for the article!

  3. Jason said on March 23, 2016 at 7:45 pm
    Reply

    Didn’t know about this feature. It makes me want to try out qBittorrent again.

    However, the best way to auto-block internet connections when the VPN is down is to use a script in your router, via something like ddwrt or openwrt.

    But I’m all for adding layers of protection!

  4. neal said on March 24, 2016 at 5:52 am
    Reply

    This of course makes it so you can’t use qbittorent when you aren’t on the VPN. Guess you can’t it both ways of course, or has someone made a qBittorent plugin that detect which network only works for the session? Like if the network you used to connect to for the session is interrupted whether that be your regular or VPN session the client shuts down.

  5. jan1973 said on March 24, 2016 at 2:36 pm
    Reply

    Tried it, but I can only choose from wired and wireless networks, the vpns that are availabe on my computer don’t show under network interace in qbittorrent.

    1. Don Gateley said on March 25, 2016 at 1:51 am
      Reply

      Yes, it doesn’t seem to see Windows VPN adapters. I use Private Internet Access which installs a TAP-Windows Adapter connection which its VPN client then uses. That one does appear in the qBittorrent list.

      Although the Private Internet Access client does itself offer a kill switch option it is very problematic in use and can leave your system unable to access the internet at all if the service is not “properly” closed.

  6. bm said on March 24, 2016 at 6:02 pm
    Reply

    Have been doing this for some time.

    However, perhaps with the specific VPN provider I use, have found one possible issue / vulnerability…

    If the VPN does not fully disconnect, but it “times out” (in that limbo state similar to when first establishing a connection but before getting an IP address), qbittorrent still seems to be “uploading” (i.e. the Total Upload Graph is not flat, but will have some lifts and even spikes in it, indicating that the magnitude of the amount of sending info has not changed from before the “time out” ).

    Don’t know enough to explain what this is about, but was surprised that all traffic was not completely stopped.

  7. Emmy said on April 7, 2016 at 4:55 pm
    Reply

    Does anyone know how do the first steps on a mac?

    1. Martin Brinkmann said on April 7, 2016 at 5:26 pm
      Reply

      Emmy, you could skip the network adapter step as qBittorrent lists them all in its interface. Maybe you can identify the right one there directly.

  8. TB said on August 24, 2016 at 3:32 pm
    Reply

    Great article – thanks for the tip and walkthrough instructions!

    As an additional suggestion (just to make the process idiot proof) within ‘Adapter Settings’ right click on your VPN adapter connection and Rename the connection something explicit, like “VPN Connection”. Whatever name you give it will show up in qBittorent as a connection option, simplifying the selection process.

  9. Bill said on October 10, 2017 at 6:52 am
    Reply

    Warning: if using windows, THIS DOES NOT WORK IF YOU HAVE IPV6 ENABLED ON YOUR SYSTEM.
    It seems that bittorrent does not respect the interface binding setting if ipv6 is enabled.

    You can test this by using the ipleak.net Torrent Leak detection (to check the kill switch, do this while your VPN is disabled):

    – if only ipv4 is enabled on your system and the interface is properly configured on qBittorrent, you will not be detected (while the VPN is down, no data goes through)

    – if ipv6 is enabled, ipleak.net will show your ipv6 address.

  10. RB said on April 22, 2018 at 1:45 am
    Reply

    Help Please..

    I am using a Free VPN in FireFox called “SETUPVPN”

    Can someone please advise how to configure qBbitorrent with SETUPVPN.

    SETUPVPN. it is an extension for Firefox and works quite well. However I require Kill Switch capability.

    Thank you in advance!!!!!!!!

    RB

    Thanks in advance,

    Ron

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.