Find Related products on Amazon

Shop on Amazon

Ports that are blocked by browsers

Published on: 2025-05-18 11:00:33

Today I was experimenting with a small project using Docker and Flask. I just created two identical services and exposed them on two different ports: nothing fancy. However, to my surprise, only one of the two seemed to be working. The first service was hosted on port 8000 . As expected, I could visit localhost:8000 and find the rendered HTML code that I had written. However, the second service hosted on port 6000 wasn’t giving me the same outcome. Instead of showing the HTML code I had prepared, my browser (Chrome) returned this error: This site can’t be reached The web page at http://localhost:6000/ might be temporarily down or it may have moved permanently to a new web address. ERR_UNSAFE_PORT Being curious, I tried to reproduce the issue without Docker, just with the bare minimum setup. I created two webservers using Python’s http.server : $ python -m http.server 8000 $ python -m http.server 6000 The two commands serve an HTTP server on port 8000 and 6000 respectively. And the ... Read full article.