Flask port 5000 blocked

I am running the Flask tutorial here:

and have set my ufw permissions like so:

sudo ufw allow 5000/tcp

but am still not seeing anything

If I login into a seperate session, and do:

curl localhost:5000

I see the website.

Any suggestions?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.


Try running ufw disable to disable the firewall, then attempt to connect. If you’re able to connect with the firewall down, you may need to reset and reconfigure the firewall.

We can do that by running the following commands, after the above command:

ufw reset
ufw default deny incoming
ufw default allow outgoing

Now we need to at least allow ports 22 and 5000 in, so we’ll go ahead and add those first:

ufw allow 22/tcp
ufw allow 5000/tcp

Once you’ve ran each of those commands, we’ll re-enable ufw:

ufw enable

Make sure you allow port 22 – not allowing that port means you won’t be able to SSH in, thus you’d either be locked out (if you’re using SSH Keys) or would need to access the console (if you’re using passwords).

@jtittle thanks for the help. I mistakingly setup iptables following the 14.04 instructions. I flushed those and am all good now. Thanks!