31

I work most of the time remotly from home. To gain access to the different servers (via SSH) I have to use OpenVPN. I would like to connect to all of them (three, sometimes four) at once, so I dont have to switch all the time. My setup is Windows 7 and a PC with only one NIC. Is it possible (if yes, how?) to connect multiple VPNs at once (maybe with some kind of a virtual network device)?

thanks Andreas

crono
  • 413
  • 1
  • 4
  • 6

3 Answers3

41

You will need to create some additional TAP-WIN32 adapters if you haven't already.

If you are using OpenVPN 2.3.x or later, run addtap.bat:

C:\Program Files\TAP-Windows\bin\addtap.bat

If you are using an older version of OpenVPN, run the tapinstall command

C:\Program Files\OpenVPN\bin\tapinstall.exe
C:\Program Files (x86)\OpenVPN\bin\tapinstall.exe

(NOTE: Maybe you should open the cmd with Administrator Privileges)

Obviously you will also need to make sure that nothing about your various VPNs conflict with each other. For example if one is modifying the default gateway you are probably going to have problems. If nothing is changing the default gateway and there are no overlapping IP addresses then you may be ok.

I am not certain if it is needed by I also renamed all my TAP-WIN32 adapters with names like VPNDEV1, VPNDEV2, VPNDEV3. In my openvpn configurations I specified the device I wanted to use by using the configuration directive dev-node VPNDEV2.

Zoredache
  • 128,755
  • 40
  • 271
  • 413
  • Would it be possible to selectively start desired VPN connections, or they will just connect all of them at the same time? – Sopalajo de Arrierez Sep 17 '18 at 15:15
  • I didn't really go over how they would be started in the answer, and don't think it applies to the original question. But it certainly should be possible to selectively start different connections. – Zoredache Sep 17 '18 at 21:37
9

The easiest way, not to mention tapinstall.exe, is to run Start > All Programs > OpenVPN > Utilities > Install > Add a new TAP vitrual ethernet adapter

Please remember to run it with administrator privileges, in other case you will just get tapinstall failed.

ChrisF
  • 1,861
  • 1
  • 21
  • 28
Filip
  • 91
  • 1
  • 1
1

I think it's the same, in windows as in linux.
If you have different subnets on the other sides, then you can just start many vpns as you want.
Anyway the vpn is using a separate device for each connection (tun+, tap+) and each network is routed trough the right device (always if on the other end there're diffent networks).

PiL
  • 1,591
  • 8
  • 6