Interview Prep/Networking/Connectivity: refused, timed out, no route

Service works with `curl localhost:3000` on the box but times out from other hosts.

BeginnerTroubleshootingConnectivity: refused, timed out, no route
Answer

Likely causes → App bound to loopback, host firewall blocks the port, or the cloud security group does not allow it.

Diagnose →

ss -ltnp | grep 3000     # 127.0.0.1:3000 vs 0.0.0.0:3000 / *:3000
sudo ufw status verbose; sudo nft list ruleset | head -50

Fix → Bind to 0.0.0.0 (Node: app.listen(3000, '0.0.0.0'); Flask: --host 0.0.0.0). Open the port in ufw/nftables and the security group from the right source CIDR only.

Prevent → Make bind address a config value and test from a second host in CI smoke tests.

All Networking questions Roadmap: Networking for DevOps

More on Connectivity: refused, timed out, no route