You intend to deploy several Azure virtual machines. You need to control which ports Internet devices can use to access the virtual machines. What should you use?
A network security group (NSG) uses inbound security rules to allow or deny traffic to Azure virtual machines by source, destination, port, and protocol. An NSG can be associated with a virtual machine network interface or its subnet to restrict Internet access to approved ports.