VM1 and VM2 are connected to VNET1 and use NSG1. You need to ensure that only VM1 and VM2 can access DB1. What should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: Configure DB1 to allow access from only VNET1..
Why this is the answer
Configuring DB1 to allow access only from VNET1 is the most effective solution. Azure SQL Database (and similar PaaS services) firewalls can be configured to accept connections from specific virtual networks, ensuring that only resources within VNET1 (like VM1 and VM2) can reach DB1. Adding the IP address range of VNET1 to DB1's firewall is a less precise method. While it might work, VNET IP ranges can be large and may not always be static or granular enough if you need to restrict access further within the VNET. Creating an application security group (ASG) is useful for grouping VMs and applying NSG rules to them, but DB1 is a PaaS service, not a VM. ASGs don't directly control access to PaaS services like Azure SQL Database. Configuring an NSG1 rule with a service tag would control outbound traffic from VM1 and VM2, but it wouldn't directly control inbound access to DB1, which is managed by DB1's own firewall settings.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed