Courseiva
Implement and Manage Virtual NetworkingeasyMultiple ChoiceObjective-mapped

AZ-104 Implement and Manage Virtual Networking Practice Question

An administrator is deploying a site-to-site VPN gateway in Azure. Which resource must be attached to the gateway so it can receive encrypted connections from the on-premises VPN device?

⚠ Common exam trap

Watch out — candidates often confuse a VPN gateway's public IP requirement with private connectivity options like private endpoints or service endpoints, mistakenly thinking the gateway can operate within the virtual network's private IP space alone.

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 public IP address resource.

A site-to-site VPN gateway in Azure requires a public IP address resource to be attached so that the on-premises VPN device can establish an encrypted IPsec/IKE tunnel to it. The public IP address provides the routable endpoint on the internet that the on-premises device connects to, and it is assigned to the gateway's front-end configuration. Without this public IP, the gateway cannot receive inbound encrypted traffic from the external network.

Answer analysis

Option-by-option breakdown

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

  • A public IP address resource.

    Why this is correct

    A VPN gateway must have a public IP address resource to serve as the external endpoint for the site-to-site tunnel. This public IP is assigned to the gateway object (not a VM NIC) and is the address your on-premises VPN device connects to over the internet. Without it, the gateway has no routable public-facing address, so the IPsec/IKE handshake cannot be initiated.

  • A private endpoint.

    Why it's wrong here

    A private endpoint is designed to provide private, internal IP access to Azure PaaS services (e.g., Storage, SQL Database) within a virtual network. It does not provide a public endpoint and cannot accept inbound site-to-site VPN traffic from the internet. A VPN gateway is a different service and relies on a public IP, not a private endpoint.

    When this WOULD be correct

    A private endpoint would be correct in a scenario where you need to connect to an Azure SQL Database or Storage Account privately from a virtual network, without exposing it to the public internet. For example: 'An administrator needs to ensure that traffic to an Azure SQL Database from a virtual network never traverses the public internet. Which resource should be deployed?'

  • A service endpoint.

    Why it's wrong here

    Service endpoints extend a subnet's connectivity to Azure services over the Microsoft backbone without going over the internet, but they do not create a public IP address or provide a VPN termination point. A service endpoint is about addressing the service's private endpoint (e.g., default service endpoint for Storage), not about establishing an encrypted site-to-site tunnel. Thus, it cannot replace the public IP resource required by the gateway.

    When this WOULD be correct

    This option would be correct in a question about securing access to an Azure service (e.g., Azure Storage) from a virtual network, where a service endpoint is used to restrict traffic to that service from the VNet only.

  • A network security group.

    Why it's wrong here

    A network security group (NSG) is a traffic-filtering layer for subnets and network interfaces; it has no role in creating a public-facing endpoint or terminating VPN tunnels. You cannot use an NSG to supply the public IP required by the gateway, and NSGs are subject to specific restrictions on the GatewaySubnet. Its function is access control, not connectivity termination.

    When this WOULD be correct

    An NSG would be correct in a question asking which resource can be associated with a subnet to restrict inbound/outbound traffic to/from Azure resources, such as controlling access to a virtual machine.

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 public IP address resource.Correct answer

Why this is correct

A VPN gateway must have a public IP address resource to serve as the external endpoint for the site-to-site tunnel. This public IP is assigned to the gateway object (not a VM NIC) and is the address your on-premises VPN device connects to over the internet. Without it, the gateway has no routable public-facing address, so the IPsec/IKE handshake cannot be initiated.

A private endpoint.Wrong answer — click to see why

Why this is wrong here

A private endpoint is used to securely connect to Azure PaaS services over a private IP address, not to receive encrypted VPN connections from an on-premises VPN device. The VPN gateway requires a public IP address to terminate the site-to-site VPN tunnel.

★ When this WOULD be the correct answer

A private endpoint would be correct in a scenario where you need to connect to an Azure SQL Database or Storage Account privately from a virtual network, without exposing it to the public internet. For example: 'An administrator needs to ensure that traffic to an Azure SQL Database from a virtual network never traverses the public internet. Which resource should be deployed?'

Why candidates choose this

Candidates may confuse 'private' with 'secure' and think that a private endpoint provides the necessary security for VPN connections, not realizing that VPN gateways inherently require public IP addresses for tunnel establishment.

A service endpoint.Wrong answer — click to see why

Why this is wrong here

A service endpoint secures Azure service access from a virtual network, but it does not provide the public IP address required for a VPN gateway to receive encrypted connections from an on-premises VPN device.

★ When this WOULD be the correct answer

This option would be correct in a question about securing access to an Azure service (e.g., Azure Storage) from a virtual network, where a service endpoint is used to restrict traffic to that service from the VNet only.

Why candidates choose this

Candidates may confuse 'service endpoint' with 'VPN endpoint' or think that a service endpoint is needed to establish connectivity between Azure and on-premises, not realizing it is for PaaS services only.

A network security group.Wrong answer — click to see why

Why this is wrong here

A network security group (NSG) filters traffic but does not provide the public IP address required for the on-premises VPN device to establish an encrypted connection to the Azure VPN gateway.

★ When this WOULD be the correct answer

An NSG would be correct in a question asking which resource can be associated with a subnet to restrict inbound/outbound traffic to/from Azure resources, such as controlling access to a virtual machine.

Why candidates choose this

Candidates may think NSGs are needed to secure the VPN connection, confusing traffic filtering with the connectivity requirement for the VPN gateway.

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

Courseiva writes every AZ-104 question from scratch — 1,049 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.