I have the VPC with two subnets within it:
- Public subnet with Nat instance
No incoming connections from the Internet are allowed. - Private subnet with the Application server
Route table for the private subnet uses eni of Nat instance for 0.0.0.0/0 destination, so my application server can send a request to some external server through the Nat instance.
VPC Flow log format is below:
So, in the flow log of Application server I saw:
Seems, that external host 31.220.24.x is trying to connect my private instance 172.30.4.205, isn't it? But, according to this document, 18 as a tcp-flag, means SYN-ACK, so it's a response from the external host for my SYN packet from an internal host. I was confused about getting SYN-ACK without the previous SYN packet, so I tried to simulate this case and recording all packets by tcpdump. I sent some data to the 31.220.24.x from 172.30.4.205 and got the same logs in the CloudWatch, but all three packets in the WireShark - SYN, SYN-ACK, ACK:
So, the question is why don't I see the first SYN packet in my CloudWatch logs of Application Server. Thanks in advance!