KatInterview

Ping Works, but Is HTTPS Port 443 Open? Network Triage

System DesignModel answer
EasyModel answerSystem Designnetworkingtcpicmp

Last updated

Decide whether a reply to ping proves a server's HTTPS port is usable, and explain how to test the port and narrow down where a failure occurs.

You are on call and a colleague says: "The server answers ping, so HTTPS must be fine."

Answer the following:

  1. Does a successful ping guarantee that TCP port 443 on that server can be reached from your machine? Explain why or why not.
  2. Describe the situation in the opposite direction: can port 443 work even when ping fails?
  3. Explain how you would check from your own machine whether port 443 is reachable, and how you would read each possible outcome (connected, refused, timed out).
  4. If the port turns out to be unreachable, outline a systematic way to find where the problem is.

State any assumptions you make about the environment, for example firewalls, cloud security groups, NAT or load balancers between you and the server, and whether "accessible" means only that a TCP connection opens or that HTTPS actually answers correctly.

Hints

Hint 1

Ping uses ICMP echo, which is not TCP or UDP and has no port number. Consider what that implies about what it can prove.

Hint 2

List everything that must be true for a connection to port 443 to succeed: a route, permissive filtering on the path and host, any NAT or load balancer forwarding, and a process listening on the port.

Hint 3

Different failures look different: an immediate reset, a hang until timeout, and a successful TCP connection followed by a failed TLS handshake each point to a different layer.