Mobile app version of vmapp.org
Login or Join
Carla537

: Trying to host server for external access - Apache, VirtualBox & Portforwarding Banging my head on the wall at this stage... Trying to host my Apache site on Ubuntu 12.10 with VirtualBox. Running

@Carla537

Posted in: #Apache #Localhost #Ubuntu #Virtualhost

Banging my head on the wall at this stage... Trying to host my Apache site on Ubuntu 12.10 with VirtualBox. Running Windows 8 host.

Things I've done:


Ensured Apache is listening on ports 80, 443 and 8080 (for thoroughness)

tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 3355/httpd
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 3355/httpd
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 3355/httpd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 681/sshd

VM is using bridged network connection
Assigned a static IP to my Ubuntu VM, which can be accessed fine from within network.
Forwarded TCP ports 80, 8080, 443 on the static IP of VM on my router
Given my VM a static NAT Address
Turned off Ubuntu firewall and router firewall
Read on forums that my ISP (Eircom) allow port 80 to be used


And I still can't access my site using the WAN/External IP (checked internally and using CanYouSeeMe.org). It says all the ports I mentioned are closed.

I'm really at a loss of what to try next... Am I missing something silly here?

Note: I haven't assigned a static IP address within the router, on within the VM. And DHCP server is enabled. Is that bad?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Carla537

1 Comments

Sorted by latest first Latest Oldest Best

 

@Rambettina238

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme