Question 370
Both subnet and NIC NSGs apply to a VM. Which effective protection must a new rule account for?
Explanation
Correct Answer
'Evaluate both applied NSGs and their combined allow/deny outcome' fits the case in which both subnet and NIC NSGs apply to a VM because traffic must satisfy relevant security checks at each applicable network boundary. By contrast, 'The lower-priority-number deny rule wins when its tuple matches' addresses a different condition: Azure NSGs evaluate matching rules in ascending priority; a broad later allow cannot override an earlier deny; it would not establish the outcome needed for this particular Azure resource. For 'Evaluate both applied NSGs and their combined allow/deny outcome', confirm the supported prerequisites and authorized scope, then verify the observed service behavior before describing the change as complete.
Incorrect Answers
'The lower-priority-number deny rule wins when its tuple matches' applies to a different feature boundary because Azure NSGs evaluate matching rules in ascending priority; a broad later allow cannot override an earlier deny. In the stated scenario where both subnet and NIC NSGs apply to a VM, 'The lower-priority-number deny rule wins when its tuple matches' does not satisfy the mechanism that traffic must satisfy relevant security checks at each applicable network boundary. The necessary action is 'Evaluate both applied NSGs and their combined allow/deny outcome', which should be checked against this Azure resource's actual permissions and state.
The nearby action 'Correct the NIC's ASG association and verify rule scope' is associated with this separate need: an application security group name was added to an NSG rule but one backend NIC isn't a member. That is because nSGs match eligible NIC group membership, not merely a similarly named application tag. Here both subnet and NIC NSGs apply to a VM, so 'Correct the NIC's ASG association and verify rule scope' misses the fact that traffic must satisfy relevant security checks at each applicable network boundary. 'Evaluate both applied NSGs and their combined allow/deny outcome' is the more defensible action; confirm its behavior in the target service before calling the task complete.
When both a subnet NSG and a network-interface NSG apply, a connection must pass the applicable rules at both scopes for its direction. An allow on the NIC does not erase a matching deny on the subnet, and the reverse can also fail. The scenario explicitly says both NSGs are attached, so inspecting only one level gives an incomplete access decision. Evaluate the same source/destination address, protocol, and port tuple through both effective rule sets before adding a rule or declaring the VM protected.






Microsoft Azure Administrator (AZ-104) Practice Tests