Skip to content
All tutorials

/tutorials/ping-and-port-checks-explained

Ping and Port Checks Explained

The difference between a real ICMP ping and a TCP-based one, and what open, closed and filtered actually mean when checking a port.

6 min read

Run Ping Test

What a ping actually tests

A ping is the simplest possible network test: send something to a host and time how long it takes to hear back. Traditionally this is done with ICMP, a protocol built specifically for this kind of network diagnostic message, but ICMP requires privileges a public web server cannot safely grant to a background process, so many web-based ping tools, including this one, time a TCP connection attempt instead.

The tradeoff of a TCP-based ping

Timing a TCP handshake to a common port like 443 gives a genuinely useful latency figure, and even a rejected connection still proves the host responded, since a RST packet is itself a reply. The tradeoff is that a host which blocks connections entirely on the ports tried will show as unreachable here even if it would answer a real ICMP ping, since there is no connection at all to time.

Open, closed and filtered are three different things

  • Open: something is actively listening on that port and accepted the connection.
  • Closed: nothing is listening, but the host is reachable and actively refused the connection (an ECONNREFUSED response, which arrives quickly).
  • Filtered: no response came back at all within the timeout, which usually means a firewall is silently dropping the connection rather than actively refusing it.

Why filtered is the most common result

Most servers, sensibly, are configured to drop connections to ports nothing is listening on rather than actively refuse them, since a refusal at least confirms the host exists, which is exactly the kind of information a firewall is designed to withhold from anyone probing it. Seeing most ports come back filtered on a well-configured server is normal and expected, not a sign of a problem.

Trying it yourself

Ping Test reports round trip time and packet loss over four attempts, and Port Checker runs the same open, closed or filtered check across about twenty well known ports at once. Try both against a host you manage to confirm the ports you expect to be open actually are, and everything else is correctly filtered rather than accidentally open.