The problem is that django is listening on localhost
, which means you cannot access the server directly over the Internet. To change this, you can specify the port / host name for django:
./manage.py runserver 0.0.0.0:8002
If you do not want the server to be directly accessible over the Internet, you can perform port forwarding using ssh:
ssh -L8002:localhost:8002 server
This will redirect your local port 8002 via ssh to the remote server.
source share