Question 213 of 1,000
Secure networkingeasyMultiple ChoiceObjective-mapped

AZ-500 Secure networking Practice Question

This AZ-500 practice question tests your understanding of secure networking. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. A key principle to apply: nSGs filter network traffic at Layer 4 (TCP/UDP) based on rules.. 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.

You have an Azure virtual machine that hosts a web application. You need to allow inbound HTTP (80) and HTTPS (443) traffic from the internet to this VM only. You also need to allow outbound traffic to the internet from the VM. You want to use a managed Azure service with minimal configuration. What should you use?

Question 1easymultiple choice
Full question →

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)

A Network Security Group (NSG) is the correct choice because it is a managed Azure service that provides a stateful, layer-3/4 firewall for filtering inbound and outbound traffic to a virtual machine. With minimal configuration, you can create inbound rules to allow HTTP (TCP/80) and HTTPS (TCP/443) from the internet (source 'Internet' or 'Any') and an outbound rule to allow all traffic to the internet (default outbound rule already allows this). NSGs are directly associated with a VM's subnet or network interface, making them the simplest managed solution for this scenario.

Key principle: NSGs filter network traffic at Layer 4 (TCP/UDP) based on rules.

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 Application Gateway

    Why it's wrong here

    Application Gateway is a layer 7 load balancer with Web Application Firewall (WAF) capabilities. It does not manage outbound traffic and is unnecessary for the stated requirement for simple per-VM rules.

  • Azure Firewall

    Why it's wrong here

    Azure Firewall is a stateful network firewall with advanced features. While it can perform this function, it is more complex and costly than needed for a single VM scenario.

  • Network Security Group (NSG)

    Why this is correct

    An NSG attached to the VM's subnet or NIC can allow inbound HTTP/HTTPS and default outbound internet access. It is simple, managed, and cost-effective.

    Related concept

    NSGs filter network traffic at Layer 4 (TCP/UDP) based on rules.

  • Azure Bastion

    Why it's wrong here

    Azure Bastion provides secure RDP/SSH access to VMs. It does not handle HTTP/HTTPS traffic or any outbound internet access.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often overthink and choose Azure Firewall or Application Gateway for simple traffic filtering, forgetting that an NSG is the most lightweight, cost-effective, and minimal-configuration managed service for basic inbound/outbound access control on a single VM.

Trap categories for this question

  • Scenario analysis trap

    Azure Firewall is a stateful network firewall with advanced features. While it can perform this function, it is more complex and costly than needed for a single VM scenario.

Detailed technical explanation

How to think about this question

NSGs are stateful, meaning that if you allow inbound traffic on port 80, the return outbound traffic is automatically permitted without an explicit outbound rule. By default, an NSG includes an outbound rule that allows all internet traffic, so no additional outbound rule is needed for the VM to reach the internet. In a real-world scenario, if you need to restrict outbound traffic to specific ports or IPs, you would add custom outbound rules, but the default rule suffices for the stated requirement.

KKey Concepts to Remember

  • NSGs filter network traffic at Layer 4 (TCP/UDP) based on rules.
  • NSGs can be associated with a VM's NIC or the subnet it resides in.
  • Default outbound rules in NSGs allow internet access.
  • NSGs are a cost-effective and simple solution for basic VM traffic control.

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

NSGs filter network traffic at Layer 4 (TCP/UDP) based on rules.

Real-world example

How this comes up in practice

A company's IT admin needs to give a contractor read-only access to production logs without sharing account credentials. Using role-based access control (RBAC) and temporary scoped permissions — not a permanent shared password — is the correct pattern. Questions like this test whether you can apply least-privilege access across cloud identity services.

What to study next

Got this wrong? Here's your next step.

Review nSGs filter network traffic at Layer 4 (TCP/UDP) based on rules., then practise related AZ-500 questions on the same topic to reinforce the concept.

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 — NSGs filter network traffic at Layer 4 (TCP/UDP) based on rules..

What is the correct answer to this question?

The correct answer is: Network Security Group (NSG) — A Network Security Group (NSG) is the correct choice because it is a managed Azure service that provides a stateful, layer-3/4 firewall for filtering inbound and outbound traffic to a virtual machine. With minimal configuration, you can create inbound rules to allow HTTP (TCP/80) and HTTPS (TCP/443) from the internet (source 'Internet' or 'Any') and an outbound rule to allow all traffic to the internet (default outbound rule already allows this). NSGs are directly associated with a VM's subnet or network interface, making them the simplest managed solution for this scenario.

What should I do if I get this AZ-500 question wrong?

Review nSGs filter network traffic at Layer 4 (TCP/UDP) based on rules., then practise related AZ-500 questions on the same topic to reinforce the concept.

What is the key concept behind this question?

NSGs filter network traffic at Layer 4 (TCP/UDP) based on rules.

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.