I currently have a development environment setup on a Windows 7 PC running Ubuntu 11.04 inside of a VirtualBox on the same box. I am using the "Bridged Network" option within VirtualBox, and inside of Windows I have bridged the network connection created by VirtualBox and my standard wifi connection from Windows 7. This has allowed me to access the webserver running in the VirtualBox across my local network under one i.p., however when I go into my router to port forward port 80 to the outside world, it is still inaccessible. Is there something I'm missing in order to get this to work as described? I would like to expose port 80 on the VirtualBox to the outside world.
It has been my experience that virtualized networks and WiFi adapters typically will have problems - and this isn't specific to just VirtualBox.
I would recommend that you switch the virtual network adapter in VirtualBox to be in NAT mode instead of bridged. You can then port forward through VirtualBox (similar to what you did on your router) to access the web server. There isn't a GUI for port forwards, so you will need to do this from the command line:
VBoxManage setextradata "VM Name Here" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/http/Protocol" TCP VBoxManage setextradata "VM Name Here" "VBoxInternal/Devices/pcnet/0/LUN#0/Config/http/GuestPort" 80 VBoxManage setextradata "VM Name Here” "VBoxInternal/Devices/pcnet/0/LUN#0/Config/guestssh/HostPort" 8080
That will forward port 8080 on your host to port 80 on your guest, so your router configuration would need to forward public port 80 to 8080 on your laptop. Feel free to adjust the port numbers to whatever makes sense on your network.
Another option would be to connect an ethernet cable as the bridged networking option would work just fine in that case.