VMware Communities
Heldlopes
Contributor
Contributor

Connecting 2 VMs between 2 host in different houses using openvpn

Hello everyone, 

I'm doing a work to school, that evolve loads of servers, clients, with windows and Linux OS. Me and my partner need to connected them all to virtual routers and switches.

She is in her home and I'm in mine, I succeed to create a vpn tunnel using openvpncloud(to connect her computer and I mine) . So now we are trying to make our test vm ping each other so far no success, we try local host and share the connection on the open VPN network adapter to it, nothing, bridge doesn't work either. So we want the host in VPN not the virtual machines it self, cause I can only have 2 VPN users. Can you help me figure it out?? 

0 Kudos
6 Replies
CarltonR
Hot Shot
Hot Shot

My understating is that you have two Hosts connected via a VPN link, on which you have created a VMware VM on each (NAT network settings).  You would then like to be able to access each Host/VM from the other.  However you are currently unable to communicate between the two Hosts or the VMs.

Questions . . . 

- what is the OS of the VMware Player's Host (yours and hers) ?

- What is/are the VM's OS (yours and hers) ?

- How is the VPN setup 'client to Host', or 'Host to Host', for both ends of the VPN ?

- [Host] with the Host VPN 'on', are you able to ping/traceroute using the IP (not the DNS name] of the remote host (yours to hers, and vice versa) ?

- [VM] with the Host VPN 'on', if item above is successful, then, from the VM can you ping/traceroute using the IP of the remote host (yours to hers, and vice versa) ?

0 Kudos
Heldlopes
Contributor
Contributor

1st and 2nd Q- We both are using windows 10 OS on physical computer and both testing with Windows 10 OS on VMs.

3rd Q - I'm using openvpn cloud regular server, peer to peer. in this case will be client to client since there is only one host and 2 clients. 

4th - both computer (host) communicate well (ping and sharefolders) each other both ways.

5th - (VM) both vmwares vms ping the vpn IP adrees, mine (vm) to mine (host) and mine (vm) to hers (host) but they don't ping mine (vm) to her's(vm) (hopefully you understand what I mean in this way) 

So what I'm trying to do is, after I turn on my VPN our VM's start to communicated with each other like if they were in the same local network. 

 

this is understandably? sorry my English some time is not the best. 

 

In soma I'm currently unable to communicate between the two VMs. with or without vpn on

0 Kudos
CarltonR
Hot Shot
Hot Shot

So, pings and sharefolders between the two Host works, in both directions . . . but connection from local VM to remote VM does not.

 

It is likely that problem may well be that the Hosts VPN doesn't have a route to the VM, and/or that the IP allocated to the local and remote VM's are within the same subnet.

Sorry, more questions:

- [VM] what are the IPs, both yours and hers, of the Host (command prompt - ipconfig/all) ?

- [VM] what are the IPs, both yours and hers, for the VMware Win 10 VMs (command prompt - ipconfig/all) ?

Could you also try this . . . 

- [Host] Remote host [hers] connected to the VPN and with the VM running, 

- [Host] On your side, VPN connected but with the VMWare Workstation software powered down

- [Host] from your side, can you ping the remote host [hers] and the VM [hers]

0 Kudos
RDPetruska
Leadership
Leadership

Many times, VPN client software will block other network cards/pipes... if that is the case, then while the host(s) are connected by the VPN client, you will not be able to have network traffic from the virtual network adapters also using that VPN tunnel.

0 Kudos
CarltonR
Hot Shot
Hot Shot

@RDPetruska in this case, from the above notes, its appears to has been possible to commutate over the Host based VPN, between one 'local' hosts VM to the other VPN connected 'remote' Host, but just not to its VM.  They can also successfully connect one host to the other.

So my hypothesis is that there is currently no routing between the host and its VM.  With this assumption in mind, it may be possible to setup a Win 10 routing table, or use some form of VMware Workstation routing to achieve this.  The only 'slight' complication in all of this, are the IP subnet allocation used across the setup !

0 Kudos
CarltonR
Hot Shot
Hot Shot

@Heldlopes some light reading material, although not entirely what you require, but with some lateral thinking, adaptation and experimentation . . . 

How to Add a Static TCP/IP Route to the Windows Routing Table
https://www.howtogeek.com/howto/windows/adding-a-tcpip-route-to-the-windows-routing-table/

https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/route_ws2008

Two computers two copies of Workstation how can I connect them together?
https://communities.vmware.com/t5/VMware-Workstation-Pro/Two-computers-two-copies-of-Workstation-how...

Connecting to VMware virtual machines using the Windows Remote Desktop utility (1018809)
https://kb.vmware.com/s/article/1018809

By the way, I'm still thinking on this . . . unless other forum contributors come up with a solution in the mean time.

 

[Post Note: still would like the info from entry ‎02-21-2022 08:24 above . . . plus, if possible a host command prompt - 'route print > routelistHost01.txt' for both the Hosts]

0 Kudos