VMware Communities
iamgenius
Contributor
Contributor

Few networking connectivity (windows firewall) questions with regards to virtualization/Connectivity between Virtualbox and Vmware

Hi to all,

I posted this in another forum but decided to post it here hoping that I will get more help. I will copying myself:

I'm running Vmware pro and VirtualBox in my main machine at home. I'm building a small pentesting lab plus some other cool stuff you do with VMs and I came across few questions. Supposedly if you run a VM inside Vmware or VirtualBox with the setting of the network adapter set to bridge mode, then it will just be like a new physical machine connected to your router and it will get an ip address from the DHCP server running on the router. And if this is the case, each machine should be able to ping the other machine no problems. This is my understanding and this is how it has always been. However, sometimes it just doesn't happen. One machine will ping the other but not vice versa. I found one culprit though. It is the windows firewall. It seems like it blocks pings by default ( is that right?) and you will either have to turn it off or add a rule to allow ping requests. How come windows firewall blocks pings? I found that to be weird ! How is someone supposed to troubleshoot connectivity issues between dozens of machines? By the way, this is not always the case. Sometimes even if you turn off the firewall it wont still ping. I found that sometimes you need to mess with the virtual network editor settings in Vmware to fix issues. I also find this to be weird because default options in Vmware and Virtualbox should allow pinging both ways. One more thing, if windows firewall blocks pings by default, then why my main machine (the actual host) is pingable from all machines (either physical or VM) even though the firewall is turned on? I don't remember adding a rule to allow incoming ping requests!

Did you guys face similar issues? What's your comments?

Reply
0 Kudos
15 Replies
iamgenius
Contributor
Contributor

I will now post my replies in the other forum:

1)

Just to clarify, when I mentioned windows firewall I meant windows firewall present in the VMs I build which I can't ping after I install them. The other thing I want to add is that the VM in the virtualbox and the other VM in Vmware will both ping the default gateway or my router. The router will also ping them. However, the machines themselves won't ping each other which is mind puzzling for me. I was once able to fix this by going to Vmware virtual network editor and selecting the actual physical network adapter for the bridge mode or something similar.

Anyone with similar problems?

2)

Anybody guys? Any virtualization gurus here?

- Machine A pings machine C and the opposite is also true

- Machine B pings machine C and the opposite is also true

- Machine A does not ping machine B and the opposite is also true

What gives? This is driving me crazy. It just doesn't make sense at all. The only abnormal thing in this setup is that machine A and machine B are in different hypervisor software, which shouldn't affect anything. Let's say machine C is the host machine.

If you have to ask why I have to use Vmware and Virtualbox: It is because one exploitable machine that I need to use only runs on virtualbox so I had to install and use it, although I normally use Vmware workstation. I'm a vmware guy.

3)

Well, in my case it is clear that it is something else in addition to the windows firewall because it even happens with linux machines. I haven't solved it yet. I think I'll just have to live with only one hypervisor running at a time and install all virtual machines that I want installed on it. I'll keep seeking a solution though.

4)

I found this but I'm not sure if is related:

https://sreeninet.wordpress.com/2015/05/31/connecting-vms-between-virtualbox-and-vmware-player/

"It is possible that the router blocks this external communication. "

It says the router may be blocking the link. I have the Netgear Nighthawk R7000 router. I'll see if there is an option I can play with.

5)

Just an update, I downloaded the remote desktop software TightVNC just to see if it can communicate between a virtualbox VM and a vmware VM. As I suspected, it didn't. It worked perfectly between VMs in the same hypervisor software OR between a VM and the host machine but not between a VM in virtualbox and another in vmware workstation. I'll see if I can get any help in vmware forums.

Reply
0 Kudos
Mits2020
Hot Shot
Hot Shot

Please provide details on the operating systems of the host and the guests, together with any additional antivirus/firewalls installed,  to help us make better sense of the situation.

Reply
0 Kudos
iamgenius
Contributor
Contributor

The host machine is windows 10 with Vmware workstation 15.5 and VirtualBox latest version. The guests are several machines. I tried it with windows 7 and windows 10 and several linux flavors. It always works except for when a machine in Vmware tries to ping a machine in VirtualBox or vice versa. I isolated firewall issues.

Here is an extra piece of information that I found about today. I ran Vmware in another physical machine of mine and the guest inside it (Fedora) was able to ping the VM in virtuabox in my main physical machine. The virtualbox VM was also able to ping Fedora in my 2nd physical machine. What gives? Maybe you are not supposed to run two hypervisor software at simultaneously in one machine?

Thanks.

Reply
0 Kudos
Mits2020
Hot Shot
Hot Shot

I did a quick search for 'virtualbox vmware coexistence' (you should too). Some people say that they can coexist but better not run simultaneously e.g. here Can I have both VMWare Player and Virtual Box in same PC???

Reply
0 Kudos
iamgenius
Contributor
Contributor

But I remember one time it just worked. Maybe it is like you said, you shouldn't expect things to behave normally if the two hypervisors are running simultaneously in the same machine, even if they work some times. I'll go research this. Thanks.

Reply
0 Kudos
continuum
Immortal
Immortal

This is supposed to work when the network configuration is reasonable.

It would help to look into details.

Provide details like

VM A using IP xy connected to vmnetX trying to ping VM B using IP xy connected to vmnet Y fails ...


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
iamgenius
Contributor
Contributor

Well, vmnetx and vmnety are the virtual adapters in vmware (vmnet1 & vmnet8 in my case). They are used for NAT or host-only connectivity. That's my understanding. Like I said i'm using bridged mode, which means I'm supposedly using vmnet0 as per my Vmware settings. There are also virtual network adapters in VirtualBox used for host only connectivity.

The IP's are just Consecutive. Say for example that Vmware and VirtualBox are both turned off, and the last IP used by my physical devices is 192.168.1.33. Here is what will happen exactly:

If I fire up a VM in Vmware it will take 192.168.1.34 as an IP and will be connected to the network as if a physical machine entered the network (Definition of bridged mode). If I fire up another VM in Vmware it will take 192.168.1.35 as an IP and will be pingable from everywhere and it will also ping all other machines. Now if I shutdown this 2nd VM in Vmware (the 192.168.1.35 will be released of course) and start VirtualBox and fire a VM inside it, this VM in VirtualBox will take 192.168.1.35 as an IP. This VM in VirtualBox will also be pingable from everywhere and it will ping all other machines EXCEPT for the 192.168.1.34 since it is residing in Vmware. Do you see it now?

I'm sorry but this is the best I could do to explain it.

Please let me know if you have more questions.

Thanks.

Reply
0 Kudos
iamgenius
Contributor
Contributor

This is an old post but it looks like the guy is having the exact same issue as mine.

virtualbox.org • View topic - VirtualBox and VMware workstation (6.5) on same machine?

I think It is just not doable. It is not advisable to run both simultaneously in the same machine like the moderator in the above thread said. I will live with that.

Reply
0 Kudos
Mits2020
Hot Shot
Hot Shot

@continuum said it should work and that he'll look into it (the one that said 'it's not advisable' is not a moderator). Just have some patience 🙂

Reply
0 Kudos
iamgenius
Contributor
Contributor

Sure. That's okay. I'm waiting

Reply
0 Kudos
continuum
Immortal
Immortal

I had VMware Workstation and VirtualBox VMs on a Linux host and had no such problems......
Have you tried wether you can connect from VMware VM to VBox VMs using other options than ping ?
Do you see the other VM in the arp-cache ? - or can you  try a network port-scanner ?


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
iamgenius
Contributor
Contributor

Yes I tried other methods. I tried to access each VM remotely from the other by using TightVNC and the native windows remote desktop app. It DIDN'T work, although it works when I do it from the host machine. I used nmap in one VM to scan the other VM and it says the machine is down.

Reply
0 Kudos
wila
Immortal
Immortal

Oh I am a moderator Smiley Happy, but being a moderator does not mean knowing better than Ulli.

BTW, that thread was two years old, things might have changed since then.

Still don't think it is a good idea to run both VMware Workstation as well as VirtualBox on the same host at the same time.

VMware most likely does not test that scenario much. But I do know that they will try to fix issues if there are some that are fixable.

Running VMware Workstation and Hyper-V simultaneously however... stay tuned.. (somewhere this week even).

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
Reply
0 Kudos
iamgenius
Contributor
Contributor

It has been a long time. It is not like I found a solution for my problem. I just want to report that I tried it yesterday and it worked. A VM in Vmware was able to ping a VM in virtualbox and vice versa. I didn't do any changes. I just came after a long time and tried it and it worked. I think my NIC has problems because it misbehaves sometimes (Loss of connectivity) and I can only fix it by disabling it and re-enabling it again. It is the built-in NIC that came with my mobo. I might need to replace it with a new one.

Thanks.

Reply
0 Kudos
continuum
Immortal
Immortal

Please have look at this picture and allow a while to let it sink in ...

I believe that for unknown reasons in some of your cases mac-addresses known to your physical local router

migrate from a VM to a VBOX

The picture explains why that would have obscure strange results.

virtual-network-vmware-vbox.png

Just guessing .... some of your obscure observations start to make sense when MAC-adresses from VM1 are transferred to Vbox 1.

Also keep in mind that the router has lease times that reserve an IP for a MAC-address for a while.

Your task would now be to doublecheck active mac addresses next time you observe voddoo effects.


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos