Courseiva
Implement and Manage Virtual NetworkingmediumMultiple ChoiceObjective-mapped

AZ-104 Implement and Manage Virtual Networking Practice Question

A branch office with a fixed public IP needs encrypted access to private Azure virtual machines and internal services in a VNet. Traffic must travel across the public internet in an encrypted tunnel, and the connection should use a route-based design. What should the administrator deploy in Azure?

⚠ Common exam trap

Many exam-takers confuse Azure Virtual Network peering (which is for VNet-to-VNet connectivity within Azure) with site-to-site VPN (which is for on-premises to Azure connectivity), leading them to select option A incorrectly.

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

A VPN gateway with a site-to-site connection.

A VPN gateway with a site-to-site connection is the correct choice because it establishes an encrypted IPSec tunnel over the public internet between the branch office's fixed public IP and Azure, using a route-based (IKEv2) configuration. This allows the branch office to securely access private Azure VMs and internal services in the VNet, meeting the requirement for encrypted traffic across 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.

  • An Azure Virtual Network peering connection to the branch office network.

    Why it's wrong here

    Azure Virtual Network peering connects two or more Azure VNets, regardless of region, over Microsoft's backbone network, providing low-latency private connectivity between virtual networks in the cloud. It does not support connections to on-premises branch sites because an on-premises network cannot be 'peered' into a VNet; peering is strictly an Azure-to-Azure capability. To connect the branch office, a VPN gateway or ExpressRoute circuit is required, and since the branch has a fixed public IP and needs encryption, a site-to-site VPN is the appropriate choice.

    When this WOULD be correct

    When connecting two Azure VNets in the same or different regions for private, high-bandwidth connectivity without traversing the internet, VNet peering is the correct choice.

  • A VPN gateway with a site-to-site connection.

    Why this is correct

    A site-to-site VPN gateway creates an encrypted tunnel from the branch office to Azure over the public internet. Because the branch has a static public IP and the requirement calls for route-based connectivity, this is the correct Azure networking service. Once deployed, the gateway can provide private access to VMs and internal services in the virtual network without exposing them directly to the internet.

  • A service endpoint on the target subnet.

    Why it's wrong here

    A service endpoint on a target subnet is a feature that extends your virtual network's identity and private address space to specific Azure PaaS services, such as Azure Storage or SQL, by adding the subnet's route to the service's public IP range. It does not create an encrypted tunnel between your on-premises branch office and the VNet; it only secures PaaS traffic from the subnet to the service using the Azure backbone. Service endpoints are also not route-based VPN devices, so they cannot satisfy the requirement for encrypted access to the entire virtual network from a branch office with a static public IP.

    When this WOULD be correct

    A question requiring secure, private access from a VNet to Azure PaaS services (e.g., Azure Storage or SQL Database) without traversing the public internet, using the Microsoft backbone network, and where the client is within the same Azure region or a peered VNet.

  • An Azure private endpoint for the virtual machines.

    Why it's wrong here

    An Azure private endpoint is a network interface with a private IP address from your virtual network, used exclusively for connecting to supported Azure PaaS services such as Azure SQL Database, Storage, or Key Vault. It cannot be applied to a virtual machine or an entire virtual network, because IaaS VMs already have their own private IPs and the endpoint does not provide a gateway for encrypted site-to-site traffic. Since the branch office requirement is to establish an encrypted tunnel to the whole VNet, a private endpoint is technically inapplicable and would not create the needed IPsec connection.

    When this WOULD be correct

    An administrator needs to securely access an Azure PaaS service (e.g., Azure SQL Database) from a VNet without exposing it to the public internet, using a private IP address within the VNet.

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.

A VPN gateway with a site-to-site connection.Correct answer

Why this is correct

A site-to-site VPN gateway creates an encrypted tunnel from the branch office to Azure over the public internet. Because the branch has a static public IP and the requirement calls for route-based connectivity, this is the correct Azure networking service. Once deployed, the gateway can provide private access to VMs and internal services in the virtual network without exposing them directly to the internet.

An Azure Virtual Network peering connection to the branch office network.Wrong answer — click to see why

Why this is wrong here

VNet peering connects two Azure virtual networks, not an on-premises network. It does not provide encrypted tunnels over the public internet or support site-to-site VPN connections.

★ When this WOULD be the correct answer

When connecting two Azure VNets in the same or different regions for private, high-bandwidth connectivity without traversing the internet, VNet peering is the correct choice.

Why candidates choose this

Candidates may confuse VNet peering with site-to-site VPN because both provide connectivity between networks, but peering is for Azure-to-Azure only.

A service endpoint on the target subnet.Wrong answer — click to see why

Why this is wrong here

Service endpoints provide secure connectivity to Azure services over the Microsoft backbone network, not encrypted tunnels over the public internet. They do not support route-based VPN designs or encrypted site-to-site connections.

★ When this WOULD be the correct answer

A question requiring secure, private access from a VNet to Azure PaaS services (e.g., Azure Storage or SQL Database) without traversing the public internet, using the Microsoft backbone network, and where the client is within the same Azure region or a peered VNet.

Why candidates choose this

Candidates may confuse service endpoints with VPN gateways because both provide 'secure' access, but service endpoints are for PaaS services, not for on-premises network connectivity.

An Azure private endpoint for the virtual machines.Wrong answer — click to see why

Why this is wrong here

Azure Private Endpoint provides private connectivity to Azure services within a VNet, not encrypted site-to-site connectivity from an on-premises network over the public internet.

★ When this WOULD be the correct answer

An administrator needs to securely access an Azure PaaS service (e.g., Azure SQL Database) from a VNet without exposing it to the public internet, using a private IP address within the VNet.

Why candidates choose this

Candidates may confuse 'private endpoint' with 'private connection' and assume it can replace a VPN for on-premises access, not realizing it only works within Azure and requires additional connectivity like ExpressRoute or VPN for hybrid scenarios.

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?”

Quick reference

VPN Protocol Comparison

ProtocolPortEncryptionAuthenticationUse Case
IKEv2 / IPsecUDP 500 / 4500AES-256Certificates / PSKSite-to-site & remote access
SSL / TLS VPNTCP 443TLS 1.3Certificates / MFAClientless remote access
L2TP / IPsecUDP 1701AES (IPsec)PSK / CertificatesLegacy remote access
WireGuardUDP 51820ChaCha20Public keysModern high-performance VPN
PPTPTCP 1723MPPE (weak)MS-CHAPv2Legacy — avoid in production

PPTP is considered insecure. IKEv2/IPsec and SSL VPN are the current recommended options.

About these practice questions

One of 1,049 original AZ-104 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.