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 failed on local address [undef]: Address already in use (WSAEADDRINUSE)
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 drivers 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.
tapinstall.exe install “C:\Program Files\TAP-Windows\driver\OemVista.inf” tap0901
Starting with OpenVPN 2.5, to manage TAP adapters in Windows, you need to use the tapctl.exe utility, which replaces the legacy tapinstall.exe.
To add a new TAP adapter, just run the command:
"c:\Program Files\OpenVPN\bin\tapctl.exe" create
If you need to create a TUN adapter, run:
"c:\Program Files\OpenVPN\bin\tapctl.exe" create --hwid wintun
List OpenVPN network adapters:
tapctl.exe list
Available TAP-WIN32 / Wintun adapters [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 can list the TAP network adapters 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}
Or use the command:
tapctl.exe 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 sessiondev-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 failed 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.
I don’t have the tap-windows folder.
Is a separate download and installer?
I found \bin\tapctl.exe sorry
Love You!! Thank’s!!
Thanks!
VPN client can be downloaded here: https://openvpn.net/community-downloads/