Jump to content
Not connected, Your IP: 3.144.92.165
Sign in to follow this  
gfdgfdgfd454asaakhj

openvpn on linux allows you to connect to 2 VPNs at the same time, how does that work?

Recommended Posts

The interface allows me to be connected to more than 1 VPN at once but what does really happen behind the scenes?

IP finder sites show the IP of the first VPN i got connected to.

But as soon as I disconnect from the first it shows the IP of the second.

 

I guess that is nice if you want to switch VPNs without being exposed for a second, but other than that what really happens behind the scenes when you do that?

Share this post


Link to post

The interface allows me to be connected to more than 1 VPN at once but what does really happen behind the scenes?

IP finder sites show the IP of the first VPN i got connected to.

But as soon as I disconnect from the first it shows the IP of the second.

 

I guess that is nice if you want to switch VPNs without being exposed for a second, but other than that what really happens behind the scenes when you do that?

 

If you don't intervene to take control of the routing table, both VPN connections will attempt to become the "default gateway" by adding two entries with a netmask of "128.0.0.0".

 

See see the description of the "def1" flag for the "--redirect-gateway" option in the OpenVPN man page:

 

https://community.openvpn.net/openvpn/wiki/Openvpn24ManPage

 

"Use this flag to override the default gateway by using 0.0.0.0/1 and 128.0.0.0/1 rather than 0.0.0.0/0. This has the benefit of overriding but not wiping out the original default gateway."

 

With competing default gateways you will get unpredictable results. To use two VPN connections you will need to learn how to use the routing table, and you may (depending on what you want to achieve) need to learn about "source address routing".

 

Without knowing what you want to use a second VPN connection for I can't really say much more. But these posts discuss this for having torrent traffic separate from all the rest:

 

https://airvpn.org/topic/9491-guide-to-setting-up-vpn-just-for-torrenting-on-windows/page-4?do=findComment&comment=66214

 

https://airvpn.org/topic/27598-traffic-split-on-debian-7/?do=findComment&comment=73698

 

Following the links may lead you to information that is relevant to your goals.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image
Sign in to follow this  

×
×
  • Create New...