Accessing VM-Hosted Website from Host

This is for discussing general topics about how to use VirtualBox.
Post Reply
Fresh0razoR
Posts: 3
Joined: 29. Mar 2011, 16:40
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows Server 2008 R2 x64

Accessing VM-Hosted Website from Host

Post by Fresh0razoR »

Hello everyone,

I have a VM created in VirtualBox which is running a web server now. Everything works fine inside the vm. Now I want to access this website from the Host (Client 1) or even better from outside the hosts network (Client 2, meaning from the internet). I draw it:


Client 2 (anywhere) ------------- Internet --------------- WLAN-Router (at home) --------------- Host(Client 1) ------------- VM (Apache)


Actually it doesn't need to be high-scaled availbility. It is only for testing purposes but it would be great if that is possible. Actual Setting for the VM is "NAT" as Network Type for the first Adapter.

I need to admit, that I am not expert in VirtualBox...! And I have no idea about networking (what seems to be the biggest problem).
At the moment I access my host via RDP (3389) and the VM through VRDP with port 3379 which gets forwarded from the WLAN-Router to my host which is used by VirtualBox then and brings me to the VM. So this means, there is no network-connection between Host and VM. Again: This is home-use stuff and CAN be insecure and stupid. It is really testing only. It just needs to work :-)))

System used: Windows 7 x64 (Host) and Windows Server 2008 R2 (VM)

Thank you very much for any help!!!
Regards
Fresh
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Accessing VM-Hosted Website from Host

Post by Perryg »

Switch to bridged or use port forwarding see Chapter 6 in your VirtualBox users guide
Post Reply