Table of Contents
Connect to multiple VPNs on Windows
On Windows OpenVPN by default installs one TAP network interface. If you want to connect to multiple VPNs simultaneously you need an interface for each VPN.
You can add a additional adapter by a batch file provided by the TAP driver. Open a command prompt with administrative rights and change to the TAP install folder.
c:\> cd "C:\Program Files\TAP-Windows\bin"
and call
addtap.bat
Example:
C:\Program Files\TAP-Windows\bin>addtap.bat C:\Program Files\TAP-Windows\bin>rem Add a new TAP virtual ethernet adapter C:\Program Files\TAP-Windows\bin>"C:\Program Files\TAP-Windows\bin\tapinstall.exe" install "C:\Program Files\TAP-Windows\driver\OemVista.inf" tap0901 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. C:\Program Files\TAP-Windows\bin>pause Press any key to continue . . .
and check it:
cd "Program Files\OpenVPN\bin" C:\Program Files\OpenVPN\bin> openvpn.exe --show-adapters Available TAP-WIN32 adapters [name, GUID]: 'Local Area Connection 2' {DD2A53C5-63BD-492A-A7F4-94E724007B2A} 'Local Area Connection 3' {EF7623C03-542A-34E8-B633-E3B742983E3}
You can also rename the interfaces now through the GUI (Control Panel\Network and Internet\Network Connections).
Put your .ovpn config and certificates files to the C:\Program Files\OpenVPN\config folder and add the nobind
to each config so that a dynamic (UDP) source port is used for each VPN session respective openvpn process.
When a static assignment between a VPN and specific interface is necessary add the TAP Interfacename as parameter of the dev-node
option to the openvpn config file:
dev tap dev-node "Local Area Connection 3"
Tested on
- Windows 10