How do I access an IIS web server on a virtualbox from the network of host machine

I've a site running on IIS on a Windows 8 virtual machine.

http://localhost/RTStreamer/Ticker.html

How do I access that site from outside the host machine? The host machine ip is 168.192.42.1

I've already changed the network of the virtual machine to "Bridged Network" but don't know what is the ip and port to access from the host machine network.


Solution 1:

Check your network settings in VirtualBox. By default, NAT is selected.

NAT is fine for most purposes, but to access the services of the guest, you have to forward the ports. There is a button at the bottom of the VirtualBox network settings to configure port forwarding.

Your IIS is serving on port 80. You have to create a rule that forwards from guest port 80 to host port 8080.

Now you can browse to http://localhost:8080 on your host.

Solution 2:

Make sure you have the firewall configured accordingly to allow HTTP traffic in the virtual machine.

Below is how to enable it in Windows Firewall, I believe it is disabled by default. Windows Firewall HTTP Inbound Traffic