I have 2 virtual machines configured and running on VMWare (Ubuntu and Kali). Both these machines are attached have a single network interface configured on VMWare which is the NAT interface.
From my findings on the NAT interface, the host IP and the internet should be visible to the virtual machines which is the case. The problem I have is that the host IP can also ping the IPs of these virtual machines and also access applications deployed on these machines directly via the virtual machines' IP addresses.
This should not be the case with the NAT interface. The host should only be able to access these virtual machines via port forwarding. That is to say, with port forwarding configured. To access one of the VMs, I would rather use the host's IP coupled with a port for which a port forwarding rule has been applied and so the traffic on this route would be forwarded to the specified virtual machine on the required port.
I need some clarification on why this is happening or some more insight into how VMWare takes care of Virtual Machines on the NAT interface if I'm am mistaken in my understanding.
One more thing to note is that these machines all have their IPs in the 192.168.x.x range instead of the 10.0.x.x range used by default for machines on the NAT interface (to the best of my knowledge).
I was able to ping the private IP of the virtual machines directly from the host command line. I was not expecting the ping to work as the Virtual machines are all on the NAT interface.
Also, the virtual machines also communicate with each other i.e I can ping one virtual machine's IP from the other successfully, which should not be the case with NAT.