Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need advice on how to forward to port 80 and how to make my VirtualBox service accessible to outside world. I can access the web server with my host computer and with putty.

I'm following a tutorial on Ars Techica.

I think it's relevant that I'm using nginx instead of apache (as suggested in the tutorial).

share|improve this question

migrated from serverfault.com Dec 1 '12 at 15:44

This question came from our site for system and network administrators.

1 Answer 1

Definitely not related to nginx, which just listens in your guest on port 80, just like any Web server would do.

You should look at the network configuration of you guest, both at the machine configuration level in VirtualBox and at the guest interfaces configuration (/etc/network/interfaces, ifconfig).

The fact that you can reach it from your host means you already have access from outside VirtualBox, so host-guest connection is OK/possible.

How have you configured your guest network in VirtualBox?

1 Your host sits on a network behind a router/NAT

Bridged connection might be the simplest setup, plugging your guest directly on the network of your host through its card, and getting its own IP address. It depends on whether you network controller (switch/hub) accepts it (MAC filtering/white-listing could prevent it). In the latter, you should configure it with NAT (see below).

What you would need then is making your host available to the outside world. You will need to configure the NAT on your network gateway (router).

2. Your host is directly connected to the outside world

You should configure your guest network as NAT in VirtualBox and make a port redirection in VirtualBox to make it listen to TCP port 80 and forward it to this guest. That is because you probably have a single IP address on your 'outside world' network, so the bridged connection will fail.

In both cases you will need to open incoming TCP 80 in your host firewall (already OK unless you changed it on Linux) and, obviously, not having anything listening on that port to allow VirtualBox to do it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.