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 http://192.168.2.20/

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 http://192.168.2.20:8080

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 192.168.2.21. 
Then we can access to the web server guest OS from the host OS by its IP, like http://192.168.2.21

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

Sources:

Editor: editor | Publish: 2012/11/20 | View: 35312

Yorumlar

10 + 12 =
Sasse 2026-04-05 10:56:23
https://my-pet-extra.store/
Amazing! This blog looks just like my old one! It's on a totally different topic
but it has pretty much the same page layout and design. Excellent choice
of colors!https://my-pet-extra.store/
Tran 2026-04-05 10:26:54
https://my-pet-extra.store/
Hi, after reading this awesome post i am too delighted
to share my knowledge here with friends.https://my-pet-extra.store/
Woo 2026-03-08 18:48:43
https://my-pet-extra.store/
Link exchange is nothing else but it is just placing the other
person's blog link on your page at appropriate place and other person will also do similar in favor of you.https://my-pet-extra.store/
Harold 2026-03-04 13:26:39
https://my-pet-extra.store/
Good day! I just want to offer you a huge thumbs up for your
excellent info you've got here on this post. I'll be coming back to your
site for more soon.https://my-pet-extra.store/
Gregg 2026-02-19 07:10:57
https://my-pet-extra.store/
This site definitely has all of the info I wanted about this subject and didn't know who to ask.
https://my-pet-extra.store/
Stoker 2026-01-10 12:55:12
https://easthope.ca/index.php?title=A_Guide_To_Uk_Pet_Shop_At_Any_Age
Inspiring quest there. What happened after?
Take care!https://easthope.ca/index.php?title=A_Guide_To_Uk_Pet_Shop_At_Any_Age
Torpy 2026-01-02 01:35:51
https://my-pet-extra.store/
Stunning story there. What occurred after? Thanks!https://my-pet-extra.store/
Freedman 2025-10-08 06:28:01
%u
I have read so many posts concerning the blogger lovers however this post is really a pleasant piece of writing, keep it up.https://gamemonitoring.net/away?url=https://ste-b2b.agency/
Bohannon 2025-10-02 03:48:59
%u
I couldn't refrain from commenting. Exceptionally well written!https://mensgames74.ru/bitrix/redirect.php?goto=https://ste-b2b.agency/
Whitton 2025-10-01 00:31:44
%u
This blog was... how do I say it? Relevant!! Finally I've found something that helped me. Thanks!https://abm-it.ru/bitrix/redirect.php?goto=https%3A%2F%2Fste-b2b.agency
Gonyea 2025-08-20 16:21:14
%u
You should be a part of a contest for one of the finest blogs on the internet. I most certainly will highly recommend this site!https://allaboutlandscapingonline.com/x/cdn/?agbz.ru%2Fbitrix%2Fredirect.php%3Fgoto%3Dhttps%3A%2F%2Fste-b2b.agency
Blackett 2025-08-17 13:47:59
%u
It's really a great and useful piece of info. I'm glad that you simply shared this useful info with us. Please stay us informed like this. Thanks for sharing.https://ste-b2b.agency/
Home | Search | Contact | Terms
Editor