Courseiva

DP-300 Implement a secure environment Practice Question

You are configuring Azure SQL Database firewall rules for a new application. The application runs on Azure VMs in the same region. To minimize latency and security risk, which approach should you use?

⚠ Common exam trap

Watch out — candidates often confuse 'allowing Azure services' (a broad, insecure setting) with the more secure virtual network service endpoint approach, or they mistakenly think adding individual VM public IPs is sufficient for security and latency.

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

✓

Configure a virtual network service endpoint and a virtual network firewall rule.

Using a virtual network service endpoint and a virtual network firewall rule allows Azure SQL Database to accept traffic only from the specific subnet hosting the application VMs, without exposing the database to the public internet. This minimizes latency by keeping traffic within the Azure backbone network and reduces the security risk by eliminating broad IP-based 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.

  • ✗

    Add a firewall rule allowing all Azure IP addresses.

    Why it's wrong here

    Allowing all Azure IP addresses admits traffic from every Azure tenant, not just your VMs, so it fails the security requirement. It is tempting because it removes connectivity friction, and it would be correct for a service needing broad access from many unrelated Azure deployments.

  • ✓

    Configure a virtual network service endpoint and a virtual network firewall rule.

    Why this is correct

    A virtual network service endpoint routes traffic to Azure SQL over the Microsoft backbone, keeping it off the public internet. The virtual network firewall rule then permits only that subnet, minimising both latency and exposure for same-region VMs.

  • ✗

    Add a firewall rule for each VM's public IP address.

    Why it's wrong here

    VM public IP addresses route traffic over the public internet rather than the Azure backbone, adding latency and exposing the database endpoint. It is tempting because it restricts access to known addresses, and it would be correct for clients outside Azure with static public IPs.

  • ✗

    Add a firewall rule allowing all Azure services to access the database.

    Why it's wrong here

    The all-Azure-services rule permits any Azure-hosted service, including other tenants', to reach the database, widening exposure beyond your VMs. It is tempting because it is quick to enable, and it would be correct for Azure platform services that cannot use a fixed outbound IP.

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)

Go deeper

Related to this question

About these practice questions

One of 574 original DP-300 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 DP-300 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 DP-300 exam.