NSG is nothing but its services will help you to allow or deny the specific port to communicate to your services within subscription or outside of the subscription. It’ has inbound and outbound rules.