Please double check all of the following: (assume aaa.bbb.ccc.ddd is the LAN IP of the HOST operating system (Windows 8).
If you are going to use NAT (safest) then proceed to step 2. If you are using 'Bridging' instead of 'NAT' then you can skip to step 6, but instead of forwarding the ports to the HOST's LAN IP then you'll forward directly to the LAN IP of the Guest VM. MAKE SURE THAT YOU DO NOT MIX THESE UP!
- Don't skip any steps, and don't rush over them.
- Make sure the guest OS is running. Run
ifconfig to find the address
that VirtualBox's DHCP assigns (likely 10.0.2.15, but still check)
- Open the Network Settings tab for the Ubuntu guest, make sure it says 'NAT' and then click 'Port Forwarding'
- Make sure you have an entry like this:
Rule 01 | TCP | aaa.bbb.ccc.ddd | 80 | 10.0.2.15 | 80 where '10.0.2.15' is the IP of the GUEST (Ubuntu).
- Save these settings, and add any other ports you desire with the safe format.
- Go to the Metro Menu, begin typing 'firewall' and make sure you're under the 'Settings' tab. Click 'Allow an app through the firewall'
- Click 'Change Settings' at the top corner of the windows; this is just an extra layer to keep you out.
- Click 'Allow Another App' and then find 'Oracle VM VirtualBox' then click 'Network Types' and allow both on Public and Private networks. Click 'Add'
- Make sure all settings are saved. Open up the Command Prompt and run 'ipconfig' to find your LAN IP address (of the HOST). Test that you can indeed access a web page via any other computer on the network, via that IP. If you have TeamViewer running, you may need to change the settings in that to NOT run on port 80, restart TeamViewer, restart the ENTIRE VirtualBox software, and try again. If you still don't see the web page, check that it's actually being served by the guest VM.
- If you DO see the web page over your LAN, then also check that you can visit the site from your WAN IP. (http://icanhazip.com) If it works, then you're done.
- If you cannot see the page via WAN but CAN see it over LAN, then you need to re-do your port forwarding in the ROUTER.
- If you cannot see the page via ANY IP address, restart the entire host computer (as well as the guest VM). If it still fails, then you'll need to post more details.
To answer your question regarding DHCP and whether or not you should have a static IP address. If you plan to run a website out of your house, then you might want to look into investing in one of the following: 1) a static WAN address for your house, or 2) a real hosting company (whether it is VPS rentals or standard). You want to do one of the following: assign a static LAN IP to the guest VM as well as to the HOST operating system. You can either disable DHCP and assign addresses manually, or lock IP addresses to the MAC addresses.
Note: this community is tailored to Professional Webmasters. This does not necessarily mean you won't find any help, but if you do need help, please try to phrase it in a way that sounds more professional. If you still need help, you can contact me by clicking my username, clicking 'homepage' and then go to the 'Contact' page. I'd be more than happy to assist.