Soru

Zorluk: OrtaConfigure Network Security Groups (NSGs) and Application Security Groups (ASGs)

An administrator is configuring network security for a two-tier application in an Azure subscription. The subscription contains a virtual network named VNet1VNet1 with two subnets: SubnetWebSubnet-Web and SubnetDatabaseSubnet-Database.

- VMWebVM-Web is deployed in SubnetWebSubnet-Web and has its network interface associated with an Application Security Group named ASGWebASG-Web.
- VMDatabaseVM-Database is deployed in SubnetDatabaseSubnet-Database and has its network interface associated with an Application Security Group named ASGDatabaseASG-Database.
- A Network Security Group named NSGSubnetNSG-Subnet is associated with SubnetDatabaseSubnet-Database.
- A Network Security Group named NSGNICNSG-NIC is associated with the network interface of VMDatabaseVM-Database.

You need to allow database traffic on TCP port 14331433 from VMWebVM-Web to VMDatabaseVM-Database while maintaining the principle of least privilege.

Which of the following actions should you perform? (Select two.)

  1. In NSG-Subnet, create an inbound security rule that allows TCP port 1433 traffic from source ASG-Web to destination ASG-Database.Cevap
  2. In NSG-NIC, create an inbound security rule that allows TCP port 1433 traffic from source ASG-Web to destination ASG-Database.Cevap
  3. C
    In NSG-Subnet, create an outbound security rule that allows TCP port 1433 traffic from source ASG-Web to destination ASG-Database.
  4. D
    In NSG-NIC, create an outbound security rule that allows TCP port 1433 traffic from source ASG-Web to destination ASG-Database.
  5. E
    Associate ASG-Web with Subnet-Web.

Cevap

In NSG-Subnet, create an inbound security rule that allows TCP port 1433 traffic from source ASG-Web to destination ASG-Database; and in NSG-NIC, create an inbound security rule that allows TCP port 1433 traffic from source ASG-Web to destination ASG-Database.
For inbound traffic to a VM in a subnet that has a subnet-level NSG and whose NIC has a NIC-level NSG, the traffic is evaluated by the subnet NSG first, followed by the NIC NSG. To permit the connection, both NSGs must have an inbound rule allowing the traffic. Specifying ASG-Web as the source and ASG-Database as the destination on TCP port 1433 maintains the principle of least privilege.

Adım Adım Çözüm

1
Analyze the network security group evaluation flow for inbound traffic.
Inbound traffic destined for a virtual machine is evaluated first by any Network Security Group (NSG) associated with the subnet, and then by any NSG associated with the network interface (NIC).
This establishes that both NSG-Subnet and NSG-NIC must explicitly permit the traffic.
2
Identify the source and destination resources using Application Security Groups (ASGs).
The source is VM-Web (represented by ASG-Web) and the destination is VM-Database (represented by ASG-Database) on TCP port 1433.
This ensures the rules use the most specific targets to maintain the principle of least privilege.
3
Formulate the required rules for both NSGs.
Create an inbound rule in NSG-Subnet allowing TCP 1433 from ASG-Web to ASG-Database, and create an identical inbound rule in NSG-NIC.
This allows the traffic through both evaluation points.

Anahtar Kavram

Inbound traffic to an Azure virtual machine with NSGs associated at both the subnet and NIC levels must pass through rules in both NSGs. Using Application Security Groups allows grouping network interfaces to simplify security policies.
Bu soruyu puanla