TCP connections that fail through a firewall are easier to troubleshoot when you can explain exactly which handshake packet is missing. This guide answers one interview question: how does the TCP three-way handshake work, and what do its flags tell you during troubleshooting?
Short answer: In a normal client-initiated connection, the client sends SYN, the server replies SYN-ACK, and the client acknowledges with ACK; the exchange synchronizes the two independent sequence-number spaces and helps prevent old duplicate connection attempts from creating false connections.[1]