How to Fix: VPN Disconnect While Torrenting (Exposes IP)

Dennis Faas's picture

Infopackets Reader Antonio S. writes:

" Dear Dennis,

I use torrents to download files on the Internet. To hide my IP address while torrenting, I use a VPN service. The problem is that sometimes I lose connection to my VPN service, and then my torrent client exposes my IP address to the rest of the world. This is a big problem because I wish to remain anonymous when torrenting. Can you tell me if there is a way to stop the torrent when VPN disconnects? "

My response:

I spent some time researching this issue. The best way to prevent your real IP from being seen if your VPN disconnects is to use a torrent client that will only listen on a virtual network adapter that the VPN uses, rather than your physical network adapter.

Most (if not all) VPN services use a virtual network adapter to connect to the VPN, which effectively re-routes traffic through the physical adapter. In doing so, your real IP address is hidden to the outside world. The VPN service also allows you to unblock torrenting sites.

Qbittorrent (which is a free torrent client) allows you to specify a virtual adapter as its communication port, though other torrent clients may also offer the same feature. For the purpose of this article I will focus on the Qbittorrent client.

How to Fix: VPN Disconnect While Torrenting (Exposes IP)

The first thing you will need to do is find out the name of your virtual network adapter used in conjunction with your VPN service. On Windows machines, this is often referred to as a "TAP Windows Adapter".

To do so:

  1. Click Start, then click PC Settings (the cogwheel).
     
  2. The "Settings" window will appear; click "Network and Internet".
     
  3. The "Settings" window will appear again with a "Status" title near the top. Look for the heading "Change your network settings" and click the link "Change adapter options" directly below it.
     
  4. The "Network connections" window will appear and all the network adapters attached to your device will be listed. The network adapter that is related to your VPN will likely have a non-meaningful name assigned to it (such as "Ethernet adapter" or such), but directly below it will say "TAP Windows Adapter". Rename this device to "VPN Ethernet" or such, so you are not confused which device provides which function further down.

Now it's time to configure Qbittorrent to only use the TAP Windows Adapter for its connections. This will handle any VPN disconnects while torrenting; put another way, this will stop the torrent when VPN disconnects and therefore will not expose your real IP address.

  1. First, download Qbittorrent if you have not already.
     
  2. Next, go to "Tools" -> "Options" from the menu at the top. The "Options" menu will appear; click the "Advanced" menu.
     
  3. Near the very top it will say "Network Interface (requires restart)" - use the pull down menu to select your VPN virtual ethernet adapter.
     
  4. Restart Qbittorrent.

Now when your VPN service is interrupted, it will stop the torrent when VPN disconnects.

You can test this functionality by downloading a "safe" torrent, then disconnect your VPN service manually. You should see that the download is stalled.

I hope that helps.

Got a Computer Question or Problem? Ask Dennis!

I need more questions. If you have a computer question - or even a computer problem that needs fixing - please email me with your question so that I can write more articles like this one. I can't promise I'll respond to all the messages I receive (depending on the volume), but I'll do my best.

About the author: Dennis Faas is the owner and operator of Infopackets.com. With over 30 years of computing experience, Dennis' areas of expertise are a broad range and include PC hardware, Microsoft Windows, Linux, network administration, and virtualization. Dennis holds a Bachelors degree in Computer Science (1999) and has authored 6 books on the topics of MS Windows and PC Security. If you like the advice you received on this page, please up-vote / Like this page and share it with friends. For technical support inquiries, Dennis can be reached via Live chat online this site using the Zopim Chat service (currently located at the bottom left of the screen); optionally, you can contact Dennis through the website contact form.

Rate this article: 
Average: 4.9 (12 votes)

Comments

Leib's picture

Hi, thanks for this, I'm not sure this is working right. I followed all your instructions and was downloading a "safe" torrent from a website that has only old movies who's copyrights have expired. Anyway it was downloading at a good clip, I disconnected from my chosen VPN's remote site going through OPENVPN and the speed immediately began to trickle down until there was no downspeed showing. What was happening here? Was my qBittorent still trying vainly to connect to my VPN? Why didn't the downloading bandwidth shutdown instantly instead of trickling down to zero?

Dennis Faas's picture

I had to reset this on my system only 4 weeks ago with the latest qBittorent and it worked fine. You must be overlooking something. If you need help with this I can connect to your system remotely and manage it (for a fee). Send me an email using the contact page if this service interests you.