- A
Azure Firewall
Why wrong: Azure Firewall is a stateful, cloud-native firewall that can inspect and filter traffic, but it is unnecessary for the stated requirement and more expensive for simple subnet-level port filtering. NSGs are the simpler, appropriate solution.
- B
Network Security Group (NSG) rule
NSG rules can be configured to allow inbound HTTPS (443) from any source and SSH (22) from the specific management IP range. NSGs provide basic stateful packet filtering at the subnet or NIC level.
- C
Azure DDoS Protection
Why wrong: Azure DDoS Protection protects against distributed denial-of-service attacks but does not filter traffic based on ports or source IP addresses.
- D
Azure Bastion
Why wrong: Azure Bastion provides secure RDP/SSH connectivity to VMs without public IPs, but it does not filter inbound internet traffic to the subnet.
Quick Answer
The answer is a Network Security Group (NSG) rule, as it provides the precise, stateful filtering required for this scenario. An NSG operates at the subnet or NIC level, allowing you to define granular inbound rules that permit HTTPS (TCP/443) from any internet source and SSH (TCP/22) only from the specific management IP range 203.0.113.0/24, while implicitly denying all other traffic. On the Microsoft Azure Security Engineer Associate AZ-500 exam, this question tests your understanding of when to use a lightweight, cost-free NSG versus a more expensive, centralized Azure Firewall—a common trap is over-engineering by choosing Azure Firewall for simple port-based filtering. Remember, NSGs are ideal for host-level, stateless-like rules (though they are stateful), while Azure Firewall is reserved for advanced, application-layer inspection across multiple networks. A quick memory tip: “NSG for the subnet, Firewall for the full net.”
AZ-500 Secure networking Practice Question
This AZ-500 practice question tests your understanding of secure networking. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
A company has a virtual network with a subnet hosting Azure VMs. They want to restrict all inbound traffic to only allow HTTPS (port 443) from the internet, but also allow SSH (port 22) only from a specific management IP address range (e.g., 203.0.113.0/24). Which Azure service should they use to achieve this filtering?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
Network Security Group (NSG) rule
A Network Security Group (NSG) rule is the correct choice because NSGs provide stateful, granular inbound and outbound filtering at the subnet or NIC level. You can create a rule to allow HTTPS (TCP/443) from any source (Internet) and a separate rule to allow SSH (TCP/22) only from the specific management IP range 203.0.113.0/24, while implicitly denying all other inbound traffic. NSGs are the native Azure service for this type of traffic filtering and do not require additional cost or deployment.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Azure Firewall
Why it's wrong here
Azure Firewall is a stateful, cloud-native firewall that can inspect and filter traffic, but it is unnecessary for the stated requirement and more expensive for simple subnet-level port filtering. NSGs are the simpler, appropriate solution.
- ✓
Network Security Group (NSG) rule
- ✗
Azure DDoS Protection
Why it's wrong here
Azure DDoS Protection protects against distributed denial-of-service attacks but does not filter traffic based on ports or source IP addresses.
- ✗
Azure Bastion
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates often choose Azure Firewall because they think it is required for any IP-based filtering, but NSGs are the correct and simpler service for subnet-level inbound port and source IP filtering without needing a centralized firewall appliance.
Detailed technical explanation
How to think about this question
NSG rules are evaluated in priority order, and each rule is stateful—meaning that if you allow inbound traffic, the return outbound traffic is automatically allowed regardless of outbound rules. When you create an NSG rule for SSH from 203.0.113.0/24, the source IP range must be specified in CIDR notation, and the rule priority must be lower (higher number) than the default deny-all rule (priority 65000) to ensure it is evaluated first. A common real-world scenario is managing hybrid worker VMs where only a jump box subnet (e.g., 203.0.113.0/24) should have SSH access, while all other internet traffic is restricted to HTTPS only.
KKey Concepts to Remember
- Read the scenario before looking for a memorised answer.
- Find the constraint that changes the correct option.
- Eliminate answers that are true in general but not in this case.
TExam Day Tips
- Watch for words such as best, first, most likely and least administrative effort.
- Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A startup's cloud architect reviews their monthly bill and notices costs are higher than expected for a long-running batch job. Switching from on-demand instances to Reserved Instances — or using Spot/Preemptible VMs — can reduce compute costs by up to 72 %. Questions like this test whether you understand the tradeoffs between commitment, flexibility, and cost across cloud pricing models.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
- →
Secure networking — study guide chapter
Learn the concepts, then practise the questions
- →
Secure networking practice questions
Targeted practice on this topic area only
- →
All AZ-500 questions
1,000 questions across all exam domains
- →
Microsoft Azure Security Engineer Associate AZ-500 study guide
Full concept coverage aligned to exam objectives
- →
AZ-500 practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related AZ-500 practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Secure identity and access practice questions
Practise AZ-500 questions linked to Secure identity and access.
Secure compute, storage, and databases practice questions
Practise AZ-500 questions linked to Secure compute, storage, and databases.
Secure Azure using Microsoft Defender for Cloud and Microsoft Sentinel practice questions
Practise AZ-500 questions linked to Secure Azure using Microsoft Defender for Cloud and Microsoft Sentinel.
Manage identity and access practice questions
Practise AZ-500 questions linked to Manage identity and access.
Secure networking practice questions
Practise AZ-500 questions linked to Secure networking.
AZ-500 fundamentals practice questions
Practise AZ-500 questions linked to AZ-500 fundamentals.
AZ-500 scenario practice questions
Practise AZ-500 questions linked to AZ-500 scenario.
AZ-500 troubleshooting practice questions
Practise AZ-500 questions linked to AZ-500 troubleshooting.
Practice this exam
Start a free AZ-500 practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this AZ-500 question test?
Secure networking — This question tests Secure networking — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: Network Security Group (NSG) rule — A Network Security Group (NSG) rule is the correct choice because NSGs provide stateful, granular inbound and outbound filtering at the subnet or NIC level. You can create a rule to allow HTTPS (TCP/443) from any source (Internet) and a separate rule to allow SSH (TCP/22) only from the specific management IP range 203.0.113.0/24, while implicitly denying all other inbound traffic. NSGs are the native Azure service for this type of traffic filtering and do not require additional cost or deployment.
What should I do if I get this AZ-500 question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Keep practising
More AZ-500 practice questions
- A public web application should be protected from OWASP-style attacks and network-layer DDoS attacks. Which two Azure se…
- A security analyst uses Microsoft Defender for Cloud. They want to view a list of all security recommendations for their…
- A company uses Azure AD B2B collaboration to invite external vendors. They want to restrict the vendors to only be able…
- A company uses Defender for Servers Plan 2. Which two capabilities are included compared with a basic posture-only confi…
- A Sentinel detection should enrich alerts with business-critical asset context. Which two mechanisms are appropriate?
- A company uses Microsoft Defender for Cloud to manage its security posture. The compliance team wants to monitor the sub…
Last reviewed: Jun 11, 2026
This AZ-500 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-500 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.