tl;dr: Is there a reason for the VM to refuse HTTP connection with host?
I have a web server running on an Ubuntu VM (I'm using VMWare) and I would like to access it from the Windows host.
I am trying to find the IP of the VM so I could access it.
I set up a Flask server on both machines, so I could easily check if the IP is correct (I thought that if I could access the host from the VM I could sniff that to figure out the source address).
Anyway, none of the IPs I tried gives anything.
C:\Users\User>arp -a
Interface: 192.168.1.103 --- 0x4
Internet Address Physical Address Type
...
Interface: 192.168.228.1 --- 0x12
Internet Address Physical Address Type
192.168.228.128 00-0c-29-98-8e-5e dynamic
192.168.228.255 ff-ff-ff-ff-ff-ff static
224.0.0.2 01-00-5e-00-00-02 static
224.0.0.22 01-00-5e-00-00-16 static
224.0.0.251 01-00-5e-00-00-fb static
224.0.0.252 01-00-5e-00-00-fc static
239.255.255.250 01-00-5e-7f-ff-fa static
Interface: 192.168.52.1 --- 0x14
Internet Address Physical Address Type
192.168.52.255 ff-ff-ff-ff-ff-ff static
224.0.0.2 01-00-5e-00-00-02 static
224.0.0.22 01-00-5e-00-00-16 static
224.0.0.251 01-00-5e-00-00-fb static
224.0.0.252 01-00-5e-00-00-fc static
239.255.255.250 01-00-5e-7f-ff-fa static
Interface: 192.168.99.1 --- 0x29
Internet Address Physical Address Type
...
According to ipconfig
, VMWare has two interfaces, VMnet1
and VMnet8
which as much as I understand correspond to two modes of networking configuration. I use Host-only: A private network shared with host
which should correspond to VMnet1
, which ipconfig
says is 192.168.228.1
.
I tried all the IPs under this interface but none worked.
I strongly suspects the IP I want is actually 192.168.228.128
(The MAC address configured for the VM is 00:0C:29:98:8E:5E
), but http://192.168.228.128:5000
in Chrome in the host yields 192.168.228.128 refused to connect.
What am I missing?
BTW, I tried going the opposite way (accessing the host from guest).
$ arp
Address HWtype HWaddress Flags Mask Iface
192.168.228.1 ether 00:50:56:c0:00:01 C ens33
192.168.228.254 ether 00:50:56:ea:0e:59 C ens33
Both give nothing either.
ip address
in the terminal? Or am I misunderstanding what it is you're looking for here?192.168.228.128
. Now why can't I access it this way from the host?localhost:5000
in the guest. I changed to port 80, it required root permissions to run but now it can be accessed from the host. Probably firewall issues which I'll try to fix. Thank you very much!