Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Disclosure: on the server, I am a nooooob. There I said it.

so I have a vm running ubuntu with a BRIDGED network connection and running a python web-server on port 8000. When I go to http://localhost:8000/ inside the vm, all is working as expected. But I need to access this web-server from outside the vm on the same machine. I used ifconfig to get the local network ip of the ubuntu vm. Now if I visit in my browser outside the vm I get a page stating:

It works!

This is the default web page for this server.

The web server software is running but no content has been added, yet.

However this is not my python web-server, its something else running on port 80. My python is running in port 8000, and when I got to I get:

Unable to connect

      Firefox can't establish a connection to the server at

What is going on here? Could ubuntu be blocking incoming connection in 8000 but allowing them on 80? This is a fresh install on the vm of Ubuntu 12.04 LTS 64 bit. Any help is appricated. Thanks.

share|improve this question
up vote 3 down vote accepted

Your Python web server can choose which address(es) it listens to. It might be listening only on the localhost address ( and not on the external IP address On the other hand, Apache (or whatever is responding on port 80) is probably listening on all addresses, including both localhost and your external IP address.

To do this with Django, try using:


See the documentation for django-admin for further details.

share|improve this answer
how would I go about doing that? – Fresheyeball Aug 15 '12 at 23:40
Development server is running at Quit the server with CONTROL-C. is what I get when I start the server, so I think you are probably right. – Fresheyeball Aug 15 '12 at 23:41
@Fresheyeball: I've updated my answer with instructions for Django. – Greg Hewgill Aug 15 '12 at 23:47
THAT DID IT! Thank you so much, I'd been struggling with this step in setting up my dev environment for some time. – Fresheyeball Aug 15 '12 at 23:54

Your Answer


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.