How to Access a Web Server on Guest OS from Host OS in Virtualbox

I realized very nice tip! If we have webserver guest OS in Virtualbox, we can access it from host OS!
For example I have IIS on Windows XP runs Virtualbox. The host OS is Ubuntu and also Apache server running.

It is easy to access Apache server (Ubuntu) from guest OS (Windows XP), by typing the host OS IP address, like

But what about to access the IIS web server which is on guest OS (Windows XP)?
To achieve this, I'll show 2 ways.. 

Method 1: Port Forwarding

I opened settings window of the virtual machine in Virtualbox, than went to "Network" pane. When "Attach to: NAT",  I clicked to "Advanced" link, then "Port Forwarding" button shown.
I opened "Port Forwarding Rules" window and added a rule like below:

Host Port: 8080
Guest Port: 80

And now I can access the IIS web server on guest OS by using http://localhost:8080 or

Methot 2: Bridged Adapter

As another simple way, we can set "Attach to: Bridged Adapter" in "Network" pane of the virtual machine settings.. In this case, no need to do port forwarding in Virtualbox.
When connected to the internet, the virtual machine getting a new local IP, like 
Then we can access to the web server guest OS from the host OS by its IP, like

In addition, I forward the port 80 from ADSL modem settings to the, and the web server that on guest OS became accessed from the internet.
Great! :)


Share Share Editor: editor | Posted: 2012/11/20 | Views: 28041


7 + 6 =
Home | Search | Contact | Terms
radyo dinle aşı takvimi podcast multimedia blog bedava dinle izle kongreler online müzik dinle selected videos nasheed music videos