Most "port not open" problems are one of four layers: nothing listening, listening only on 127.0.0.1, a host firewall, or the provider security group. Check from the inside out so each step rules out one layer.
When to use
A service works on the server but times out or is refused from your computer.
Prerequisites
Replace 25774 with your port
root or sudo
Steps
1
Is anything listening, and on which address?
Read-only
PORT=25774
ss -lntp | grep ":$PORT "
Expect: No output: nothing listens. 127.0.0.1:PORT: local only, reach it through an SSH tunnel or a reverse proxy. 0.0.0.0 or [::]: listening on every interface.
Expect: An HTTP code such as 200 or 302 means the service itself works.
3
Container port mapping
Read-only
docker ps --format 'table {{.Names}}\t{{.Ports}}'
Expect: 0.0.0.0:PORT->... is public. 127.0.0.1:PORT->... is loopback only. Docker-published ports bypass UFW.
4
Host firewall
Read-only
if command -v firewall-cmd >/dev/null 2>&1 && firewall-cmd --state >/dev/null 2>&1; then firewall-cmd --list-all; elif command -v ufw >/dev/null 2>&1; then ufw status verbose; else echo "no host firewall tool active"; fi
Expect: On Rocky/Alma/RHEL check firewalld ports/services. On Debian/Ubuntu check UFW. When the host firewall is active, a non-Docker service needs an allow rule.
What it changes
Read-only. If every step looks right, open the port in your provider security group or firewall panel; it sits outside the server.