Nat – Make virtualBox webserver public

nat;port-forwardingvirtualbox

I'm new to virtualBox so please bear with me.

I have a win 7 Ultimate N host (my physical machine)
I have a virtual machine with win 2008 server running sharepoint which I want to access from public internet.

My Host virtual IP: 192.168.56.1
My Host physical IP: 192.168.0.15

MY Virtual machine (Guest) IP: 192.168.56.102

WHat I have done so far….

  1. Activated NAT adapter and using the port forward option:
    Host: 192.168.56.1
    Host port: 10000
    Guest: 192.168.56.102
    Guest port: 80

  2. On my router/modem's firewall forwarded port 10000 requests to: 192.168.0.15

  3. Rebooted Virtual Machine.

However, when I browse even from my physical machine to: 192.168.0.15:10000 nothing happens. And when I click diagnose in IE, it finally gives me: "The remote device or resource wont accept the connection".

I can browse the sharepoint site from my physical machine by using the virtual box ip address and machine name: 192.168.56.102

SO I turned off windows firewall, but still mo joy.

Best Answer

You may want to consider switching the guest over to using bridged networking instead. This means the guest will request it's own address from your NAT:ing modem. If you can tell your modem to assign a specific IP, you can then make sure your server gets a persistent address that the modem can forward too.

This of course still requires firewalls to be properly configured or turned off.