exam questions

Exam AZ-500 All Questions

View all questions & answers for the AZ-500 exam

Exam AZ-500 topic 5 question 64 discussion

Actual exam question from Microsoft's AZ-500
Question #: 64
Topic #: 5
[All AZ-500 Questions]

You have an Azure subscription that contains the resources shown in the following table.



Both VM1 and VM2 connect to VNET1 and are configured to use NSG1.

You need to ensure that only VM1 and VM2 can access DB1.

What should you do?

  • A. For NSG1, configure a rule that has a service tag.
  • B. Add the IP address range of VNET1 to the Firewall settings of DB1.
  • C. Create an application security group.
  • D. Configure DB1 to allow access from only VNET1.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Ajdlfasudfo0
Highly Voted 2 years, 4 months ago
Selected Answer: D
D. Configure DB1 to allow access from only VNET1. I would go with D. How would configuring the NSG that VM1 and VM2 are attached to influence who is allowed to access DB1? You have to configure DB1 in a way that I only allows VM1 & VM2, one possible option would be allowing the VNET1 to access DB1
upvoted 21 times
xRiot007
9 months ago
If VM3 appear on VNET1 , it will have access to DB1 if you go with D.
upvoted 4 times
...
rudyydmitrij
2 years, 1 month ago
possible, but the question states "only VM1 and VM2", the subnet can contain other stuff.
upvoted 7 times
heatfan900
1 year, 8 months ago
y C is the correct answer
upvoted 4 times
pentium75
10 months ago
How would an ASG assigned to VNET1 prevent others (outside of VNET1) from connecting to DB1?
upvoted 2 times
...
...
...
...
[Removed]
Highly Voted 1 year, 7 months ago
The correct answer is C. Create an application security group. Explanation: To ensure that only specific VMs (in this case, VM1 and VM2) can access DB1, you can use application security groups (ASGs) in combination with network security group (NSG) rules. Application Security Groups (ASGs) provide a way to group virtual machines and define network security policies based on those groups. Once you define an ASG and associate the VMs (VM1 and VM2) with that ASG, you can then configure NSG rules to allow or deny traffic to or from the ASG.
upvoted 16 times
nox2447
1 year, 7 months ago
This is the only correct answer here.
upvoted 3 times
...
pentium75
10 months ago
How would that prevent others (outside of VNET1) from connecting to DB1?
upvoted 1 times
...
...
ITFranz
Most Recent 4 months ago
Selected Answer: C
To support the answer: To ensure that only VM1 and VM2 can access DB1, you can use a combination of Network Security Group (NSG) rules and Application Security Groups (ASGs). Here's how to set it up: 1. Create an Application Security Group: - Create an ASG named "ASG-DB-Access" - Associate VM1 and VM2 with this ASG Modify NSG1 to include the following rules: Create an inbound security rule that allows traffic: Source: ASG-DB-Access Destination: DB1's IP address Service: SQL (port 1433 for SQL Server) Priority: Set a priority higher than any conflicting deny rules Create a deny rule with a lower priority to block all other inbound traffic to DB1 Answer = C
upvoted 2 times
...
sudowhoami
9 months, 2 weeks ago
Selected Answer: D
The answer is D.
upvoted 1 times
...
nExoR
9 months, 3 weeks ago
you can use both - service tags and ASG to create security rules, but the correct answer is C: service tag. not A - because it says about creating a service tag for NSG1, while the rule needs to be configured on DB side B: could work, but IP is by default dynamic and this method is not recommended D: it's not following least priviledge/access principle allowing entire vNet
upvoted 1 times
...
ACSC
1 year, 1 month ago
Selected Answer: C
Assign VM1 and VM2 to an ASG and then create a NSG rule with the ASG
upvoted 5 times
Pamban
1 year ago
I am also thinking the same.. it has more sense from networking point of view
upvoted 2 times
...
...
saptati
1 year, 4 months ago
Selected Answer: D
The correct answer is D. Option C suggests creating an application security group (ASG), which is typically used for grouping virtual machines based on application requirements. In this scenario, the main objective is to restrict database access to specific virtual machines (VM1 and VM2). Configuring the firewall settings of the database (DB1) directly to allow access only from the virtual network (VNET1) where VM1 and VM2 reside is a more direct and suitable approach for this specific requirement.
upvoted 2 times
...
epomatti
1 year, 4 months ago
Selected Answer: D
D - It makes sense to restrict from the Cosmos DB perspective. Best possible answer.
upvoted 3 times
...
[Removed]
1 year, 5 months ago
On NSG create a rule Source IP Address VM1 and VM2 and Service Tag Azure COSMOS DB Allow Source IP Address Any Service Tag Azure COSMOS DB Deny Now in the COSMOS DB Configure VNET1 in the VNET section You can also use ASGs where you add the NIC of both VM1 and VM2 to simplify the 1st NSG rule
upvoted 1 times
[Removed]
1 year, 5 months ago
This way you can control which VMs can access the Cosmos DB
upvoted 1 times
pentium75
10 months ago
But it does not prevent computers in VNET2, or your home computer, from accessing DB1.
upvoted 1 times
...
...
...
wardy1983
1 year, 6 months ago
Answer: D Explanation: Configure DB1 to allow access from only VNET1. How would configuring the NSG that VM1 and VM2 are attached to influence who is allowed to access DB1? You have to configure DB1 in a way that I only allows VM1 & VM2, one possible option would be allowing the VNET1 to access DB1
upvoted 2 times
...
_punky_
1 year, 7 months ago
Selected Answer: D
D for me
upvoted 1 times
...
TheProfessor
1 year, 7 months ago
Selected Answer: C
C seems to me accurate.
upvoted 3 times
...
Catlyn
1 year, 8 months ago
Can someone explain how the effect of B and D are different, I am confused?
upvoted 1 times
TheProfessor
1 year, 7 months ago
It's the same, but different wording.
upvoted 1 times
...
...
BigShot0
1 year, 8 months ago
Selected Answer: C
Cannot be VNET because that would allow access from other virtual machines. Create and ASG.
upvoted 4 times
...
DeviantMoto
1 year, 8 months ago
Selected Answer: C
Literally in the definition of ASG. restrict access to the servers, not the VNet. https://learn.microsoft.com/en-us/azure/virtual-network/application-security-groups
upvoted 7 times
...
heatfan900
1 year, 8 months ago
The answer is C. (ONLY ACCESS DB1 FROM VM1 AND VM2 IS THE PREMISE OF THE QUESTION) A) does not serve that purpose because anyone in VNET1 can access the DB via the SERVICE TAG rule on the NSG. B) does not serve that purpose because the entire VNET1 would be allowed access to DB1. D) does not serve that purpose because it is another way of allowing the entire VNET1 access to DB1. C) is the only option that allows you to group VM1 and VM2 to an ASG. A rule can then be created on the NSG that references the ASG as the source and allows access to DB1 as destination.
upvoted 4 times
...
heatfan900
1 year, 9 months ago
D is not correct. The question clearly states to only allow VM1 and VM2 (not the entire VNET to) Adding an NSG RULE requires you to create two of them. One for each VM as SOURCE and the DB1 as DEST. The correct answer is 'C'. You create an ASG that references both VM1 and VM2 and add create the NSG rule reference it as the SOURCE and DB1 as the DEST.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...