exam questions

Exam AZ-104 All Questions

View all questions & answers for the AZ-104 exam

Exam AZ-104 topic 5 question 113 discussion

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

You have two Azure virtual machines named VM1 and VM2 that run Windows Server. The virtual machines are in a subnet named Subnet1. Subnet1 is in a virtual network named VNet1.

You need to prevent VM1 from accessing VM2 on port 3389.

What should you do?

  • A. Create a network security group (NSG) that has an outbound security rule to deny destination port 3389 and apply the NSG to the network interface of VM1.
  • B. Configure Azure Bastion in VNet1.
  • C. Create a network security group (NSG) that has an outbound security rule to deny source port 3389 and apply the NSG to Subnet1.
  • D. Create a network security group (NSG) that has an inbound security rule to deny source port 3389 and apply the NSG to Subnet1.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
AK4U_111
Highly Voted 2 years ago
Answer is correct. However, it will prevent VM1 from connecting to any machine using 3389, not just VM2
upvoted 20 times
northgaterebel
3 weeks, 4 days ago
I feel like the test writers are saying, "You are a bad IT person who makes wrong choices. Which one of these incorrect solutions is more correct?"
upvoted 1 times
...
Rams_84zO6n
1 year, 11 months ago
The rule could be further tightened by specifying both source and destination in the rule. That would address your concern.
upvoted 5 times
...
...
GBAU
Highly Voted 2 years ago
A: The rule works although it will prevent VM1 from connecting to anything on 3389 they way it is described in the question (no limit to the destination IP detailed). Configuring a Bastion will do nothing to prevent VM1 from accessing VM2 in anyway. C & D are wrong as they are SOURCE port Deny not destination port Deny. A connection to remote port of 3389 is not going to be from a source port of 3389 (especially if RDP is already listening on these VMs as that port will be unavailable as a source port), it could be any port in 1024-65535.
upvoted 9 times
...
Nathan12345
Most Recent 1 week, 4 days ago
Selected Answer: A
is correct, for individual VMs need to use network interface
upvoted 1 times
...
Josh219
3 months, 1 week ago
Selected Answer: A
A, is correct
upvoted 1 times
...
[Removed]
5 months ago
Selected Answer: A
A is correct
upvoted 1 times
...
Amir1909
11 months, 2 weeks ago
A is correct
upvoted 2 times
...
CyberKelev
2 years ago
Selected Answer: D
D. Create a network security group (NSG) that has an inbound security rule to deny source port 3389 and apply the NSG to Subnet1.
upvoted 1 times
Elm2021
1 year, 9 months ago
I thought the same but it is just that, with D, Both Devices (VM1 And VM2) will be restricted to access the same Port.
upvoted 3 times
...
shimondaz
1 year, 5 months ago
that wont prevent vm1 too access vm2 on 3389 since VM1 anf vm2 are on the same subnet , NSG assigned on the subnet would prevent access from outside the subent.
upvoted 1 times
...
...
mdwSysOps
2 years ago
Correct Answer is A, however it will prevent VM1 from connecting using RDP not only to VM2 but to any other VM created...to my understanding is a poorly designed rule, but it will work.
upvoted 2 times
djgodzilla
2 years ago
which is crazy . what are they tying to teach people. "How to lock yourself up"?
upvoted 5 times
Batiste2023
1 year, 3 months ago
Well, you could still use SSH to access the server, no? https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse?tabs=gui
upvoted 1 times
...
...
...
zellck
2 years ago
Selected Answer: A
A is the answer.
upvoted 1 times
zellck
2 years ago
We need to deny destination port 3389, not source port 3389, hence A.
upvoted 2 times
...
...
AndreaStack
2 years ago
Selected Answer: A
Correct Answer: A A. Create a network security group (NSG) that has an outbound security rule to deny destination port 3389 and apply the NSG to the network interface of VM1. By creating an outbound security rule in a network security group (NSG) to deny destination port 3389, you can prevent VM1 from accessing port 3389 on VM2. By applying the NSG to the network interface of VM1, you can enforce the security rule specifically for VM1. This solution provides a centralized way to manage and enforce network security for VM1, and it helps to prevent unwanted access to port 3389 on VM2 from VM1. ***If it was D. "Create a network security group (NSG) that has an inbound security rule to deny source port 3389 and apply the NSG to Subnet1" you could prevent access to port 3389 on VM2 from ANY SOURCE (including VM1). By applying the NSG to Subnet1, you can apply the security rule to both VM1 and VM2. The question asked "to prevent VM1 from accessing VM2 on port 3389", not from any source.
upvoted 3 times
AndreaStack
2 years ago
Anyway, missing the "least privilege" requirement, both two answers (A&D) could be good. But I choose A, for above explained reason!
upvoted 1 times
zellck
2 years ago
D is not an answer because it is referring to source port 3389, not destination port 3389.
upvoted 1 times
...
...
...
Kimoz
2 years ago
A is correct , if you appied NSG on the inbound ov VM2 no other vms will access it also as well , and here in the question he mentioned that you want to prevent VM1 means the action should be taken in VM1
upvoted 2 times
...
er101q
2 years, 1 month ago
D. Create a network security group (NSG) that has an inbound security rule to deny source port 3389 and apply the NSG to Subnet1. To prevent VM1 from accessing VM2 on port 3389, you need to create an NSG with an inbound security rule that denies traffic from the source port 3389. Then you need to apply the NSG to Subnet1, which will block the traffic to all the virtual machines in the subnet.
upvoted 1 times
...
FabrityDev
2 years, 1 month ago
Selected Answer: A
A is correct. It will prevent connections from VM1 on port 3389 to any destination, including the other VM. Question does not say that VM1 should be able to access other VMs on this port so it's fine to block all outgoing connections.
upvoted 4 times
...
Ashfaque_9x
2 years, 1 month ago
Selected Answer: A
A. Create a network security group (NSG) that has an outbound security rule to deny destination port 3389 and apply the NSG to the network interface of VM1.
upvoted 1 times
...
azhunter
2 years, 1 month ago
Correct answer A
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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago