I have two VMs running on my machine, using VmWare Player (Linux). The network configuration used is NAT for each VM. Here is the link to vmware player's network configuration i have used.
VM1: 192.168.181.175
VM2: 192.168.181.174
Host Machine - vmnet8 : 192.168.181.1
There is one http service running on VM2 at port 9990.
Now, the following works...
VM2 -> Browser -> http://localhost:9990/some-path <- trying to access VM2's http service from VM2 itself, using "localhost"
But, the below does not work.
VM1 -> Browser -> http://192.168.181.174:9990/some-path <- trying to access VM2's http service from VM1
VM2 -> Browser -> http://192.168.181.174:9990/some-path <- trying to access VM2's http service from VM2 itself, using IP address
Similarly, here is what telnet complains, from both VM1 and VM2
telnet 192.168.181.174 9990 Trying 192.168.181.174... telnet: Unable to connect to remote host: Connection refused
And here is what the host machine's telnet complains,
telnet 192.168.181.174 9990 Trying 192.168.181.174... telnet: Unable to connect to remote host: No route to host
The firewall is inactive on all - the host machine, VM1 and VM2.
Also, the ping from VM1 -> VM2, VM2 -> VM1, and Host-Machine -> VM1 or VM2 works fine.
I want VM1 to be able to access http service which is hosted on VM2. Can someone suggest how to get it through?
Note: I am primarily a software programmer/dev. I am not aware of nitty-gritty configurations of the firewalls etc. So in advance apologies, if the details provided are insufficient. ;)