If an NSG is on both the subnet and the NIC, how is traffic evaluated?

AdvancedConceptNetworking
Answer

Inbound: subnet NSG first, then NIC NSG. Outbound: NIC NSG first, then subnet NSG. Traffic must be allowed by both. A deny at either layer drops it.

That is why "I opened port 443 on the NSG and it still times out" usually means there is a second NSG. Check the effective rules:

az network nic list-effective-nsg -g rg -n vm-web-nic -o table

We prefer subnet-level NSGs only, to keep a single place to look.

Azure All Azure questions Roadmap: Azure core services

More on Networking