Question 121 of 1,000
Secure networkingeasyMultiple ChoiceObjective-mapped

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?

Question 1easymultiple choice
Review the full subnetting walkthrough →

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

    Why this is correct

    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.

    Related concept

    Read the scenario before looking for a memorised answer.

  • 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

    Why it's wrong here

    Azure Bastion provides secure RDP/SSH connectivity to VMs without public IPs, but it does not filter inbound internet traffic to the subnet.

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.

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.

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 →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

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.

Loading comments…

Sign in to join the discussion.

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.