VNET1 という名前の仮想ネットワークを含む Azure サブスクリプションがあります。VNET1 には、次の表に示すサブネットが含まれています。

各仮想マシンは静的 IP アドレスを使用します。
次の要件を満たすには、ネットワーク セキュリティ グループ (NSG) を作成する必要があります。
- インターネットから VM3、VM4、VM5、VM6 への Web 要求を許可します。
- VM1 と VM2 間のすべての接続を許可します。
- VM1 へのリモート デスクトップ接続を許可します。
- VNET1 へのその他のすべてのネットワーク トラフィックを防止します。
作成する必要がある NSG の最小数はいくつですか?
正解:A
NSGs can be associated to subnets, individual VMs (classic), or individual network interfaces (NIC) attached to VMs (Resource Manager). You can associate zero, or one, NSG(s) to each VNet subnet and NIC in a virtual machine. The same NSG can be associated to as many subnets and NICs as you choose.
So, you can create 1 NSG and associate it with all 3 Subnets.
- Allow web requests from internet to VM3, VM4, VM5 and VM 6: You need to add an inbound rule to allow Internet TCP 80 to VM3, VM4, VM5 and VM6 static IP addresses.
- Allow all connections between VM1 & VM2: You do not need an NSG as communication in the same VNet is allowed by default, without even configuring NSG.
- Allow remote desktop to VM1: You need to add an inbound rule to allow RDP 3389 in VM1's static IP address .
- Prevent all other network traffic to VNET1: You do not need to configure any NSG as the there is explicit deny rule (DenyAllInbound) in every NSG.