A subnet has an NSG applied. You want to allow inbound SSH (port 22) from a specific on-premises IP address, but you want to block SSH from all other sources, including other VNets. By default, there is a rule allowing VNet-to-VNet traffic. What should you configure?

Direct Answer (Verified)Reviewed by Sunny (Senior Cloud Engineer)

Correct Answer: Create an Allow rule for the specific IP at priority 100, and a Deny rule for Any source at priority 200

NSG rules are processed in priority order (lowest number first). Default rules (priority 65000+) allow VNet inbound traffic. To block VNet traffic while allowing one IP, you must c...

๐Ÿ“‹Part of Microsoft Certified: Azure Network Engineer Associate (AZ-700) ยท Azure Certification Practice
Real Exam ScenarioNetwork Security Groups

A subnet has an NSG applied. You want to allow inbound SSH (port 22) from a specific on-premises IP address, but you want to block SSH from all other sources, including other VNets. By default, there is a rule allowing VNet-to-VNet traffic. What should you configure?

โœ“ Correct Answer & ExplanationNetwork Security Groups

Correct Answer

Create an Allow rule for the specific IP at priority 100, and a Deny rule for Any source at priority 200

Why This Answer Is Correct

NSG rules are processed in priority order (lowest number first). Default rules (priority 65000+) allow VNet inbound traffic. To block VNet traffic while allowing one IP, you must create a specific Allow rule (e.g., priority 100) for the IP, followed by a broader Deny rule (e.g., priority 200) targeting port 22. You cannot delete default rules.

๐Ÿ“š What This Question Tests

This question evaluates your knowledge of Network Security Groups โ€” a core concept tested in Microsoft Certified: Azure Network Engineer Associate (AZ-700). Understanding Network Security Groups is essential for designing scalable, secure, and cost-effective cloud architectures. Mastery of this topic will help you answer scenario-based questions confidently on exam day.