Reputation: 6859
In my Server(CentOS 7.9) I running a docker container.
[root@att ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
028fe4b64697 training/webapp "python app.py" 21 minutes ago Up 21 minutes 0.0.0.0:6000->5000/tcp
this is a web page.
I can in my local macOS wget the page:
wget remote_ip:6000
and get the index.html
, but I can not access in Browser, it report error:
The Safari browser cannot open the page "http://demo.com:6000/". The error is: "Not allowed to use restricted network port" (WebKitErrorDomain:103)
Upvotes: 0
Views: 2550
Reputation: 1235
I was just running into this problem myself. Seems browsers block certain ports in the 6000-range. Not just Safari, but also Chrome/Chromium link, and Firefox as well.
> 6000, // X11
> 6566, // sane-port
> 6665, // Alternate IRC [Apple addition]
> 6666, // Alternate IRC [Apple addition]
> 6667, // Standard IRC [Apple addition]
> 6668, // Alternate IRC [Apple addition]
> 6669, // Alternate IRC [Apple addition]
> 6697, // IRC + TLS
This seems to be for security reasons (I havn't dived into this). Mozilla has a reference to a cross-protocol attack. That might explain why the 6xxx ports that are blocked are also standard ports for certain applications (e.g. X11, IRC).
Solution: Either use https or another port. If on Chrome you can start chrome with explicitly allowing ports.
Upvotes: 2