locked
Using additional Network Security Group instead of default Network Security Group in Azure RRS feed

  • Question

  • Hi,

    In Azure, I have seen in some cases, we first create the Network Security Group, then create Virtual Machine and once the Virtual Machine is crated, we associate the Network Security Group with the Virtual Machine.

    On the other side, while creating the Virtual Machine, by default, a Network Security Group is also created by itself.

    Therefore, does it matter, instead of creating another Network Security Group, if we use same Network Security Group which is created with the Virtual Machine by default?

    And

    After associating the new Network Security Group with the Virtual Machine, if we delete the default Network Security Group which is created by itself with the Virtual Machine, does it matter?

    Best Regards

    MrGNS


    InTechSys

    Wednesday, May 20, 2020 7:06 PM

All replies

  • By default, when you create a VM in the Azure portal, an NSG is automatically created and associated to the NIC the portal creates. This NSG contains one inbound rule with a priority of 1000, service set to RDP, the protocol set to TCP, port set to 3389, and action set to Allow. If you want to use the same NSG, you can do so and add additional rules to the NSG.

    Optionally, you can also opt out of creating an NSG with a virtual machine, by choosing None. 

    


    - Vaibhav Gujral


    Wednesday, May 20, 2020 7:36 PM
  • Thank you for replying for my question.

    As you said, ".......If you want to use the same NSG, you can do so and add additional rules to the NSG."

    I noticed same i.e. additional rules can be added in the same NSG but I have seen in some video tutorials, trainer creates new NSG. That's why I posted the question. Is there any recommendation like this for using new NSG?

    Moreover, after associating the new NSG with VM, if I delete the default NSG, does it matter?

    Best Regards

    MrGNS


    InTechSys

    Wednesday, May 20, 2020 9:37 PM