Hi @Gene Poon, Heung Chun - HKSS ,
the Azure NSG is stateful:
Network security groups (NSGs) are simple, stateful packet inspection devices. NSGs use the 5-tuple approach (source IP, source port, destination IP, destination port and protocol) to create allow/deny rules for network traffic.
The state is recorded in flow records for each session internally in the NSG. But there are no exact details available, or at least I haven't found them, what kind of properties/attributes are in a flow record.
A flow record is created for existing connections. Communication is allowed or denied based on the connection state of the flow record. The flow record allows a network security group to be stateful.
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten