9

I have installed Oracle VM Box and created a Virtual machine. Now I have hosted(in IIS) a website in the virtual machine. I want this website to be browsed in the host machine's browser.

Can anybody let me know the settings needs to be configured.

2 Answers 2

8

Make sure the "network card" on the virtual machine is set to use bridged mode. This will give it an IP on the same subnet as your host machine.

Eg. If your host machine is 192.168.1.10, the virtual machine should get 192.168.1.X. This can vary depending on your network setup, but that's the usual case.

I figure you've already done these two, but you should also make sure your web server is set up to accept requests that did not originate from itself (localhost/127.0.0.1), since the server views the host as a separate machine.

And lastly, make sure Windows' firewall or any other firewall you have running on the VM is configured to allow the web server to accept incoming connections.

5
  • Can you plz provide me any step by step procedural links, as I am week in networking issues.
    – suryakiran
    Dec 14, 2011 at 4:03
  • I have set the same, but Host machine IP and VM IP are not matching. BTW I am connected to the internet and IP for the host is dynamic(Not static IP). Please help me.
    – suryakiran
    Dec 14, 2011 at 8:11
  • 1
    Your internet connection shouldn't affect this. Assuming you're not on dialup, your physical machine (the host) should have an internal IP address (within your local area network). The VM and host IPs should not match exactly, but if you have the adapter in bridged mode, they should both be on the same subnet, with the fist 3 parts of the addresses matching, but not the last. If your host is 192.168.1.10 and the VM is 192.168.1.11, putting 192.168.1.11 in your host's browser should work.If the IPs are not on the same subnet, there might be some other problem on your network.
    – Vickash
    Dec 14, 2011 at 20:12
  • 1
    Also, check which port your server is running on. Web servers traditionally use port 80. I'm not familiar with IIS, but it may be configured to use a different port number by default in a development environment. If it's running on a different port, such as 8080, you'll have to put 192.168.1.11:8080 into the browser.
    – Vickash
    Dec 14, 2011 at 20:14
  • @Vickash How do I know what IP address the virtual machine is on? Jul 28, 2019 at 11:58
5

With bridged network mode I lost internet connectivity in my guest.

Instead I used NAT mode with port forwarding.

This is an example where Apache hosts websites in the guest:

enter image description here

3
  • Didn't have to change adapter mode, didn't have to set up a second adapter, very straightforward thanks.
    – Shaun
    Aug 22, 2016 at 11:12
  • How did you know what value to put for "Guest IP"? Jul 28, 2019 at 12:00
  • I think I ran ip a in the guest. Jul 28, 2019 at 12:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .