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

`curl: (28) Failed to connect to api.internal port 443 after 130001 ms: Connection timed out`

BeginnerTroubleshootingConnectivity: refused, timed out, no route
Answer

Likely causes → SYN packets got no reply at all. Something silently dropped them: security group, NACL, host firewall with DROP, a missing route back, or the host is down.

Diagnose →

nc -vz -w 3 api.internal 443
traceroute -T -p 443 api.internal
# on the target, are SYNs arriving?
sudo tcpdump -ni any 'tcp port 443 and tcp[tcpflags] & tcp-syn != 0'

Fix → If SYNs never arrive, fix the path (SG, NACL, route). If they arrive but no SYN-ACK leaves, fix the host firewall or listening service. If SYN-ACK leaves but the client never sees it, look for asymmetric return routing.

Prevent → Use short connect timeouts (curl --connect-timeout 5) so failures surface fast, and keep firewall rules in code.

All Networking questions Roadmap: Networking for DevOps

More on Connectivity: refused, timed out, no route