Question - What is NSG?
Answer -
NSG or Network Security Group contains a list of ACL rules that allow or deny network traffic to subnets, network interface cards (NICs) linked to a subnet, or both. When an NSG is connected to a subnet, the ACL rules are for all virtual machines that are located in that subnet. The traffic restrictions to an individual NIC are achieved by linking the NSG directly to that NIC.