Archive
OpenVPN: How to Connect Multiple VPNs at the Same Time on Windows

OpenVPN: How to Connect Multiple VPNs at the Same Time on Windows

2024-11-22 OpenVPN client on Windows with default settings only supports one active VPN connection. When installing OpenVPN on Windows, only one virtual adapter

Related articles

6 Best Free VPNs for Mac and Safari in 2024 A Beginner’s Guide to Game of Vampires: Twilight Sun with Best Tips and Tricks-Game Guides-LDPlayer Connect to VPN Gate by Using L2TP/IPsec VPN Protocol

OpenVPN client on Windows with default settings only supports one active VPN connection. When installing OpenVPN on Windows, only one virtual adapter of the TAP or Wintun type is created. If you want to connect to multiple OpenVPN servers at the same time, you need to create an additional WinTAP or Wintun network adapter.

If you try to start another VPN connection, an error will appear:

OpenVPN GUI
Connecting to VPN_name has failed
All TAP-Windows adapters on the system are currently in use
TCP / udp : socket bind is failed fail on local address [ undef ] : Address already in use ( WSAEADDRINUSE )

OpenVPN: How to Connect Multiple VPNs at the Same Time on Windows

To fix this problem and allow simultaneous connection to two (or more) OpenVPN servers, you need to add another virtual TAP network adapter. Each VPN connection will use its own TAP network interface.

Open an elevated command prompt and go to the directory:

Cd “ C:\Program Files\TAP - Windows\bin ”

Run the file:

addtap.bat

The BAT file will run tapinstall.exe with several parameters. This command will add an additional network adapter in Windows with the TAP-Windows Adapter V9 driver. Run the bat file as many times as you want to use concurrent OpenVPN connections.

Device node created. Install is complete when drivers are installed...
updating driver for tap0901 from C:\Program Files\TAP - Windows\driver\OemVista.inf .
Drivers installed successfully.

After that, a new device “TAP-Windows Adapter #2” will appear in the list of Windows network adapters.

To manually add the new TAP adapter and install the driver , you is use can use the command :

tapinstall.exe install “C:\Program Files\TAP-Windows\driver\OemVista.inf” tap0901

start with openvpn 2.5 , to manage tap adapter in Windows , you is need need to use the tapctl.exe utility , which replace the legacy tapinstall.exe .

To add a new TAP adapter, just run the command:

" c:\Program Files\OpenVPN\bin\tapctl.exe is create " create

If you need to create a TUN adapter, run:

" c:\Program Files\OpenVPN\bin\tapctl.exe is create " create --hwid wintun

The Wintun driver from the developers of WireGuard appeared in OpenVPN 2.5. The Wintun driver is faster than the classic OpenVPN WinTAP driver.

List OpenVPN network adapters:

tapctl.exe list

available TAP - WIN32 / Wintun adapter [ name , GUID , driver ] :
' OpenVPN Wintun ' { f308344f-76c9 - 4b07 - a931 - e56d7243942d } wintun
' OpenVPN TAP - Windows2 ' { e91285c8 - 728F-4643 - 9485 - 114970074AF7 } tap - windows6
' OpenVPN Wintun2 ' { f101234f-3212 - 4b07 - a931 - e56d72432123 } wintun

You is list can list the TAP network adapter available to the openvpn client using the command :

 “C:\Program Files\OpenVPN\bin\openvpn.exe” --show-adapters

Available TAP-WIN32 adapters [name, GUID]:
'Local Area Connection 2' {f308344f-76c9-4b07-a931-e56d7243942d}
'Local Area Connection 3' {f101234f-3212-4b07-a931-e56d72432123}

To remove all installed TAP adapters, run the

deltapall.bat

file in the same folder.

Or use the command :

  tapctl.exe is delete delete " openvpn TAP - Windows6 "

Check the configuration files (.ovpn) of your VPN connections in the C:\Program Files\OpenVPN\config. Add the following options to the OVPN config files:

  • nobind – use a dynamic UDP source port for each VPN session
  • dev-node 'OpenVPN TAP-Windows2' – bind an OpenVPN connection to a specific network interface (the name of the network adapter is specified)

The OpenVPN client binds to a specific interface when a connection is established. You can add the command to connect to OpenVPN to Windows startup. In addition, you can assign a static IP address to the OpenVPN client.

If you do not bind OVPN profiles to a specific network adapter, then when you try to create a second OpenVPN connection, an error may appear:

TCP / udp : socket bind is failed fail on local address [ undef ] : Address already in use ( WSAEADDRINUSE )

Note that when using multiple OpenVPN connections, the server must send you the route to its subnets via the push (you can’t:

push "route 10.1.10.0 255.255.255.0 10.1.10.1"

Now your OpenVPN client will allow you to run two or more active VPN connections at the same time. On Linux, multiple VPN connections are allowed by default when connecting to OpenVPN from the terminal.