How the TCP three-way handshake works
Before an application sends any data over TCP, the two ends exchange three short packets: SYN, SYN-ACK and ACK. Knowing which one is missing tells you where a failing connection stops. A successful ping does not prove a TCP port is reachable, and an open port does not prove the application protocol is healthy.
What the three packets do
The client sends a SYN carrying its starting sequence number. The server answers with a SYN-ACK, which acknowledges that number and supplies its own. The client’s ACK completes establishment. SYN followed by SYN-ACK proves more than simple IP reachability: something answers on that port and packets pass in both directions.
Refused or timed out: reading the failure
RST and retransmission timeouts point to different failure modes. An RST in reply to a SYN usually means the host is reachable but nothing accepts connections on that port, which the client reports as “connection refused”. Silence makes the client retransmit the SYN and finally time out; that suggests a filter dropping packets, a routing problem or a host that is down. Stateful firewalls can also reject packets that do not belong to an expected connection state.
Finding where the connection stops
Work from near to far: the process and its bind address, the host firewall, the route, NAT and port forwarding, then CGNAT or ISP filtering. Finish with a test from outside your local setup, such as the 2ip port checker. If the handshake completes but large transfers stall, look at MTU and Path MTU Discovery separately. Always read a port number together with its transport protocol.