How to Selectively Route Traffic through VPN

Recently, we had a user approach us with the following problem.

“I use myPlex sharing and when I connect to my VPN I am not able to use this because my VPN service provider doesn’t support port forwarding or split tunneling. I only want my UsenetServer and NZBmatrix to route through VPN.”

This usually occurs because VPN services force all traffic to go through the VPN. On top of that, the software they provide doesn’t include the functionality required to specify exactly what traffic should go through the VPN. So, what we need to do is get a setup that stops all network traffic from going through the VPN when connected to the VPN connection. Then, we need to specify what routes should go through the VPN connection. This is achievable by a number of ways, but our method will require us to have the following:

What’s required?

  1. VPN Service Provider (This guide will be using IPVanish, read our review here)
  2. OpenVPN Client Viscosity (Available for Mac & Windows)

Let’s begin the setup.

Step 1: Install Viscosity. The installation is pretty self explanatory. Just click next until the installation is completed.

Step 2:  Next, launch the application.

Step 3: Next, we need to load our VPN service provider’s config into Viscosity. This contains all the available VPN servers for the specific provider.

Remember, this guide assumes you are signed up with IPVanish VPN. If not, head over to the Viscosity website to find out how to import your VPN service provider’s config . For IPVanish, download the configs here: Configs ZIP Link

Step 4: Extract all the contents of the ZIP file you just downloaded into a folder. I dumped them all into a folder called “configs” on my desktop, but feel free to put them anywhere. Just remember the location.

Step 5: Now, let’s load them into Viscosity. Hit the + > Import Connection > From File

Step 6: Now, select the server you’d like to load into Viscosity. Do so by selecting the file and clicking “Open”. In this example, I will add “ipvanish-US-Atlanta-atl-a01”. Feel free to add as many as you’d like by repeating this step.

Step 7: With the server now successfully added. Highlight the server from the list and click “Edit”.

The next few steps will achieve the following:

  • Stop all network traffic from going through the VPN when connected to the VPN connection.
  • Specify what routes should go through the VPN connection.

Step 8: After clicking “Edit” you will see a new screen appear. Navigate to the “Advance” tab.  Add “route-nopull” (without the quotes) into the text box as seen below.

Step 9: Once completed, head over to the “Networking” tab and click the + button. We will now add what traffic we would like to route through the VPN.

Step 10: You will now see a screen similar to the image below. In the screenshot, you will also see the IP Address for “86.24138.81”. Click “Add” to add the route into the table. Any traffic to will now go through the VPN.

Step 11: You can look up IP addresses for websites by using the “nslookup” command in cmd prompt. Keep in mind, some websites might have multiple IP Addresses. Add both if you run across any instances like this.

Step 12: Now that you have added the IP Addresses click the “Save” button.  Then, let’s connect to the VPN by locating the Viscosity Icon in the task bar and clicking “Connect VPN server Name”  Input your VPN Service User name and Password and you should successfully connect to the VPN.

That’s basically it. The setup shouldn’t have been too complicated for most users. Hopefully you all see how this could be beneficially to your setup. You can continue to enjoy the benefits of your hi-speed connections, but also add a level of privacy to your web browsing.

As always, please make sure to post any comments, questions, or concerns below.

Learn Anything? Share it!