Courseiva
Implement and Manage Virtual NetworkinghardMultiple ChoiceObjective-mapped

AZ-104 Implement and Manage Virtual Networking Practice Question

VM-Web01 is connected to Subnet-Web in VNet-Prod. Users on the internet cannot access the website hosted on TCP port 443. You confirm that VM-Web01 has a public IP address and the web service is running. You need to allow inbound HTTPS traffic with the least administrative effort. What should you do?

⚠ Common exam trap

Many candidates think a public IP alone is sufficient for internet access, forgetting that NSGs act as a stateful firewall that blocks all inbound traffic by default unless explicitly allowed.

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

Add an inbound NSG rule allowing TCP 443.

The VM has a public IP and the web service is running, but internet users cannot access it. The most common reason is that the Network Security Group (NSG) associated with the subnet or NIC is blocking inbound traffic. Adding an inbound NSG rule to allow TCP 443 is the least administrative effort to permit HTTPS traffic from the internet.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Add an inbound NSG rule allowing TCP 443.

    Why this is correct

    The VM can accept HTTPS traffic only if an inbound security rule explicitly permits TCP 443. Azure network security groups (NSGs) are stateful and default to deny all inbound internet traffic, so even if the VM has a public IP address and a web server running, connections on port 443 will be dropped until a rule with a higher priority (e.g., 100) is added. This rule should specify Source as 'Internet', Destination port range as '443', Protocol as 'TCP', and Action as 'Allow'. Because NSGs are stateful, the corresponding outbound return traffic on the ephemeral port will be automatically allowed, making this the only action listed that directly resolves the problem.

  • Create a user-defined route to the internet.

    Why it's wrong here

    A user-defined route (UDR) overrides Azure's system routes for outbound traffic within a subnet. The default system route for the 0.0.0.0/0 address prefix already directs outbound internet traffic directly to the Internet, so creating a UDR to the internet is unnecessary and could even break existing connectivity if misconfigured (e.g., pointing to a virtual appliance or invalid next hop). The real issue described is inbound traffic from users on the internet trying to reach VM-Web01 on TCP 443, which is controlled by the NSG's inbound rules, not by outbound routing. Routing decisions apply to traffic leaving the subnet, not to how the VM responds to inbound sessions; the VM can respond because the NSG is stateful, so the outbound return traffic is permitted automatically. Hence, a UDR does not address the inbound deny caused by the missing NSG rule.

    When this WOULD be correct

    You need to force all internet-bound traffic from a subnet to go through a network virtual appliance (NVA) for inspection. Creating a UDR with 0.0.0.0/0 next hop set to the NVA's IP address would be correct.

  • Configure VNet peering with another virtual network.

    Why it's wrong here

    Virtual network peering establishes a low-latency, private connection between two Azure VNets, allowing resources in both networks to communicate using private IP addresses as if they were in the same network. It has no effect on how internet traffic reaches a VM; inbound internet traffic arrives at the VM's public IP and is filtered by the NSG and the VM's own operating system firewall. Peering also does not add any public IP address or change the VM's network security configuration, and it cannot be used to 'forward' internet connections through another VNet unless that VNet has a public IP and appropriate reverse-proxy/NAT services—which the option does not specify. Therefore, peering is not a solution to exposing the web server to the internet; it only solves private-to-private connectivity.

    When this WOULD be correct

    You need to enable communication between VMs in two different virtual networks (e.g., VNet-A and VNet-B) without using a gateway or public internet. VNet peering provides low-latency, private connectivity.

  • Create a private endpoint for VM-Web01.

    Why it's wrong here

    A private endpoint assigns a private IP address from a virtual network to an Azure PaaS service (such as Storage, SQL Database, or Key Vault) to enable private, secure access from within the VNet. It cannot be attached to an IaaS virtual machine like VM-Web01, and it does not create any inbound internet-facing listener on the VM, nor does it affect NSG rules controlling internet traffic. Publishing a VM's website to the internet requires a public IP and an NSG rule that permits the incoming port—not a private endpoint, which is designed to keep traffic off the public internet, not to expose it. Thus, creating a private endpoint is both incompatible with the VM resource type and counterproductive to the stated goal of internet access.

    When this WOULD be correct

    When you need to access an Azure PaaS service (e.g., Azure SQL Database) from a virtual network without exposing it to the public internet, you would create a private endpoint to enable private connectivity.

Option-by-option analysis

Why each answer is right or wrong

Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The AZ-104 exam frequently reuses these exact scenarios with slightly different constraints.

Add an inbound NSG rule allowing TCP 443.Correct answer

Why this is correct

The VM can accept HTTPS traffic only if an inbound security rule explicitly permits TCP 443. Azure network security groups (NSGs) are stateful and default to deny all inbound internet traffic, so even if the VM has a public IP address and a web server running, connections on port 443 will be dropped until a rule with a higher priority (e.g., 100) is added. This rule should specify Source as 'Internet', Destination port range as '443', Protocol as 'TCP', and Action as 'Allow'. Because NSGs are stateful, the corresponding outbound return traffic on the ephemeral port will be automatically allowed, making this the only action listed that directly resolves the problem.

Create a user-defined route to the internet.Wrong answer — click to see why

Why this is wrong here

A user-defined route (UDR) controls traffic routing within a virtual network, not inbound access control. It cannot allow or deny traffic to a VM; that is the function of network security groups (NSGs).

★ When this WOULD be the correct answer

You need to force all internet-bound traffic from a subnet to go through a network virtual appliance (NVA) for inspection. Creating a UDR with 0.0.0.0/0 next hop set to the NVA's IP address would be correct.

Why candidates choose this

Candidates may confuse routing with security filtering, thinking that directing traffic to the internet via a route could somehow enable access, or they may overcomplicate the solution when a simple NSG rule suffices.

Configure VNet peering with another virtual network.Wrong answer — click to see why

Why this is wrong here

VNet peering connects two virtual networks, but it does not allow inbound internet traffic to a VM. Internet access requires an NSG rule or a public IP with proper security, not peering.

★ When this WOULD be the correct answer

You need to enable communication between VMs in two different virtual networks (e.g., VNet-A and VNet-B) without using a gateway or public internet. VNet peering provides low-latency, private connectivity.

Why candidates choose this

Candidates may think peering provides internet access or mistakenly believe it can replace NSG rules for inbound traffic from the internet.

Create a private endpoint for VM-Web01.Wrong answer — click to see why

Why this is wrong here

A private endpoint is used to securely connect to Azure PaaS services (like Azure SQL, Storage) over a private IP address, not to allow inbound internet traffic to a VM. It does not expose a VM to the internet.

★ When this WOULD be the correct answer

When you need to access an Azure PaaS service (e.g., Azure SQL Database) from a virtual network without exposing it to the public internet, you would create a private endpoint to enable private connectivity.

Why candidates choose this

Candidates may confuse private endpoints with public IP or NSG concepts, thinking that creating a private endpoint somehow enables internet access, or they may misunderstand the purpose of private endpoints as a general security feature.

Analysis generated from the official AZ-104blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”

Visual reference

192.168.1.0 /24 256 addresses (254 usable) 192.168.1.0 /25 Subnet A 128 addr (126 usable) 192.168.1.128 /25 Subnet B 128 addr (126 usable) Borrowing 1 bit from host portion creates 2 subnets (/25)

About these practice questions

This AZ-104 question is part of Courseiva's 1,049-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AZ-104 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-104 exam.