How to protect yourself from VPN traffic leaks

Teacher

Professional
Messages
2,670
Reaction score
806
Points
113
Hello, running in the shadows! Hello, random subscriber. In this article, we'll talk more about VPN security. And more specifically, how to protect yourself from losing VPN traffic.

The security of a VPN connection is a rather serious and extensive issue. I won't be able to tell you all the nuances of protecting a VPN connection in just one article. There are many different factors that affect VPN security. One of the most important things is choosing a VPN. If you are visiting us for the first time, I highly recommend reading the article on choosing a VPN on this channel.

But one correct choice of VPN does not solve the problem. There is such an unpleasant thing as a VPN traffic leak. Today I will talk about how to try to prevent VPN traffic leakage on Windows and Linux. I will tell you about five ways (in 2 articles) that you can use to make using a VPN more secure. Of course, they will not solve all the problems of VPN traffic leakage, but they will dramatically improve VPN security.

If you are going to use a VPN or are already using it and are thinking about security, you should also be aware of the WebRTC leak and take care of its premature shutdown. Read it for now, and I'll wait for you here."

VPN Security
You can learn more about VPN technology in my article "What is a VPN".

VPN traffic leak. What is it?
This is when traffic that is supposed to go through a VPN connection gets to the network in plaintext. As a rule, this is not due to problems with the VPN server or client. There are two reasons for leaks in virtual private networks:
  1. Sudden loss of the VPN connection. Let's imagine a situation in which you started a process through a VPN, and suddenly at night, when you are fast asleep, the connection breaks. You already know what will happen in this situation.
  2. The reason for the leak of encrypted traffic may also be a common problem on hosts that support two versions of the IP protocol (the so-called dual-stacked networks/hosts).
The topic, as I said, is extensive. Therefore, in today's article I will talk about how to avoid the problems of the first scenario. All the ways to solve this problem discussed in the manual do one simple thing — during the loss of the VPN connection, they do not allow programs to interact with the network.

Protection against VPN traffic leakage

For Windows, there are several ways: using the task scheduler, a bat file, and using special utilities. Let's take it in order.

VPN Security with Task Scheduler
Use the Win +key combination R launch the run window.

Using the "taskschd.msc" command, we start the task scheduler.

In the "Action" drop-down menu, select "Create task".

On the "General" tab, in the "Name" field, enter the action names.

Check the box "Run with the highest permissions".

Go to the "Triggers" tab and click on the "Create" button.

In the trigger creation window, in the "Start task" drop-down menu, select "On event".

In the " Log " drop-down menu, select "Application".

In the "Source" drop-down menu, select "RasClient".

In the "Event Code" drop-down menu, enter the event code "20226".

Go to the "Actions" tab and click on the "Create" button. In the "Create action" window, in the "Action" drop-down menu, select "Launch program".

In the "Program and script" field, enter "taskkill.exe".

In the "Add arguments" field, enter "/f / im spysoftnet.exe". Where instead of spysoftnet.exe enter the name of the desired executable program file. For example utorrent.exe.

Another option might be to use PowerShell. This option suggests not killing every single process with "taskkill.exe", and disable the entire network in case of a VPN connection failure. This is done like this.

To a place "taskkill.exe "in the" Program and script " field, enter "powershell.exe".

Instead of the "/f /im "argument spysoftnet.exe" entering the argument " Get-NetAdapter | Disable-NetAdapter -Confirm:$false».

After such a shutdown, you can return the network to its previous state only with the handles, using the command "powershell.exe Get-NetAdapter | Enable-NetAdapter -Confirm:$false».

If you use a VPN on a laptop, it would be more correct to remove the check mark from the item "Run only when powered from the mains" in the "Power" field on the "Conditions" tab.

We have dealt with this method. Let's see what else you can do to protect yourself from VPN traffic leaks.

That's all for today. See the continuation of this topic in the articles below. Stay tuned!
 
353d7da3-c94f-4cf3-b487-c38e47c6280b.png


We will continue our conversation on the topic of VPN traffic leaks. See the first part above on our forum.

Go:

VPN Security with VPN Kill Switch
This method is a bit similar to what I described above. It also doesn't require any additional software to be installed.

All that is required of you is to run the bat file after starting the VPN and select "1 — Enable Kill Switch".

Now, if the VPN connection is lost, the script automatically deletes the Default Gateway IP address in your network card, making network access unavailable for all programs installed on your computer.

To restore the previous network settings, you need to re-run the file and select "2 - Disable Kill Switch".

Utilities for protecting against VPN traffic leaks
And now I will tell you about the best programs that can solve the problem with a sudden break in the VPN connection.

VPN Security with VPN Watcher
VPN Watcher is a small utility for monitoring your VPN connection. Add the required program with the green button. We turn on the monitoring mode and sleep peacefully.

The program is distributed in two versions: paid and free. In the free version, the user can only add one program. The software runs on Windows and MAC OS X operating systems.

A great advantage of this utility is the low consumption of memory and processor resources. Only 2 MB.

VPN security with VPNCheck

VPNCheck is a sophisticated tool for monitoring and managing your VPN connection. The program has two versions: the paid version, which has a richer functionality. Works with OpenVPN has a tool that fixes DNS leaks and much more. You can also add any number of programs in the paid version.

In the free version, VPNCheck can monitor PPTP VPNs. Automatically closes all programs when the VPN breaks. It has a limit of three programs.

Setting up VPNCheck is not complicated. First, run the program. Then click on the "Config" button and add the program that you want to control.

Please select the checkboxes "Close" — closed programs and "Autorun" — restart the program at your discretion.

You also need to fill in the "Login info" field. All data must be identical to the VPN settings in the operating system.

The free version is available for Windows and Linux. Paid version only for Windows.

VPN Security with VPN Lifeguard

VPN Lifeguard is a free, open source, portable utility that prohibits programs from working during the loss of a VPN connection. The program is very similar in functionality to VPN Watcher. When set up correctly, it does a great job and works just fine.

First of all, turn on the VPN. After connecting, we launch (from the administrator) VPN Lifeguard. In the main window of the program, click the "Config" button. In the "IP-address" field, the program should automatically detect the VPN, Local IP, and Gateway settings.

In the "Software to managed" field, use the "Browse" button to add the necessary programs.

After setting up, we return to the main window of the program and click the "Start" button. The utility supports PPTP and IPsec protocols and does not work with OpenVPN.

Attention! For those who don't know, there is a free Avira Phantom VPN for mobile devices. In certain cases, the app can be very useful. In addition, you may be interested in an overview of VPN services for Android-in one of the articles on my channel.

That's all. Don't forget about VPN security. Everyone has a good mood and safety in the network!
 
Top