Page 1 of 1

Accessing VM-Hosted Website from Host

Posted: 29. Mar 2011, 17:12
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

Re: Accessing VM-Hosted Website from Host

Posted: 29. Mar 2011, 18:27
by Perryg
Switch to bridged or use port forwarding see Chapter 6 in your VirtualBox users guide