Connecting to a service gives Connection refused on one host and hangs until Connection timed out on another. What does each tell you?
- Refused means a firewall blocked it; timed out means the service is overloaded. Firewalls that DROP produce timeouts; those that REJECT produce refusals.
- They mean the same thing; the difference is which client library you used. The distinction is one of the most useful early signals in network debugging.
- Refused indicates a DNS failure. DNS failures surface as name-resolution errors before any connection is attempted.
- Refused means a machine answered with a TCP RST — you reached the host and nothing was listening on that port. Timed out means nothing answered at all, which points at a firewall dropping packets, a wrong address, or a routing problem. A RST is a positive answer from a reachable host; silence is the signature of a drop.
Refused means something answered you, but timed out means nothing answered at all.
This is the fastest branch point in network triage and interviewers use it constantly, often as a warm-up before something harder. Answering with what each error sends you to check next is much stronger than just defining the terms.
Treating the two the same and going straight to the firewall. On a refused connection the network already worked.