Can't reach django app when running python runserver

Posted May 23, 2021 797 views

I have followed the tutorial on setting up a django server but i cant reach my app outside the server, i have already open up port 8000 using ufw, what might be the error?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

After many many hours of research i came across this post in stackoverflow basically the important part was this
I’m not 100% sure why, but the Firewall rules from the Digital Ocean Firewall Control panel were interfering with my droplet configuration.

I’ve deleted the Firewall rules from the control panel and now netstat reports that my 8080 port is open and I’m able to talk to the server from the outside world, finally.

I deleted the Droplet firewall rules and let only the rules created with ufw and the issue was fixed. hope it helps

Hi @marosersa,

I see you found a solution but yes, by Default ports are closed to public reach unless specifically specified. As such you had to open the port on either UFW or Iptables depending if ufw is enabled.

Additionally, there are times where if you configured rules on the Digital Ocean Firewall Control panel they can further interfere with the reach on certain port.

Anyway, thank you for posting your findings and solutions for other users that find this Quesiton.