1

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.

7
  • 1
    If all you're looking for at this point is the IP address of the guest VM, how come you don't just log into the VM and type ip address in the terminal? Or am I misunderstanding what it is you're looking for here?
    – n8te
    Commented Nov 17, 2017 at 8:00
  • 1. I didn't know I could do that. 2. I did that, it confirms that the address is 192.168.228.128. Now why can't I access it this way from the host?
    – Neo
    Commented Nov 17, 2017 at 8:05
  • 1
    Is your server listening on port 5000? Do you have a firewall enabled on your guest? If so, do you have it set to allow incoming on port 5000?
    – n8te
    Commented Nov 17, 2017 at 8:06
  • @n8te Yes, the server responds to 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!
    – Neo
    Commented Nov 17, 2017 at 8:14
  • @phyrfox I use Host-only as mentioned.
    – Neo
    Commented Nov 17, 2017 at 8:15

0

You must log in to answer this question.

Browse other questions tagged .