I'm using a Flask application with virtual environment. When I start the server, I can access it locally via the IP `127.0.0.1:5000`, but I'd like to make it accessible on my `WLAN` `(pointing at 10.0.0.1:5000)`. I don't know if it is possible, the fact that virtual environment kind make my server sandboxed.

I tried naively to change my `/etc/hosts` file

```
127.0.0.1    10.0.0.2

```

but when I launch my browser at <http://10.0.0.2:5000>, that doesn't work.
(I can still access other services on <http://10.0.0.2>, but the redirection at port 5000 is not working).

I'm not sure to get it right. Help will be greatly appreciated.

**Edit**
for the virtual environnement, I'm just using [virtualenv](http://sametmax.com/les-environnement-virtuels-python-virtualenv-et-virtualenvwrapper/ "virtualenv"), a utility to handle python dependancy. Then I installed [Flask-SocketIO](http://flask-socketio.readthedocs.org/en/latest/). I'm not sur if it is actually really sandboxed, but the fact is I can't connect to port 5000.

if I do

```
sudo nestat -anp | grep 5000

```

I get:

```
tcp     0      0 127.0.0.1:5000      0.0.0.0:*       LISTEN     18541/python

```