man tcpdump
Capturing TCP packets with particular flag combinations (SYN-ACK, URG-
ACK, etc.)
There are 8 bits in the control bits section of the TCP header:
CWR | ECE | URG | ACK | PSH | RST | SYN | FIN
Let’s assume that we want to watch packets used in establishing a TCP
connection. Recall that TCP uses a 3-way handshake protocol when it
initializes a new connection; the connection sequence with regard to
the TCP control bits is
1) Caller sends SYN
2) Recipient responds with SYN, ACK
3) Caller sends ACK