Change NSG for an Azure VM

Copper Contributor

How can we add/change Network Security Group to an already configured Azure Virtual Machine? I am not getting any option of selecting a different NSG.

Capture.PNG

 

 

 

3 Replies

Hello Himanshu,

 

You can only associate a NSG to a classic VM. If you're using an Resource manager VM, you can associate the NSG to the NIC or the subnet.

 

Best regards,

Ruud Gijsbers

It is quite easy to associate an NSG to a NiC or subnet, Generally I think it is better to associate it to the subnet and have all the rules for that subnet in a single NSG. But this may require some thought and complexity. To Associate select the NSG in the list of resources, or create a new one, on the NSG blade there is two items Subnets and Network interfaces, select the appropriate one and click associate...

 

Select your VM > NIC > Network Security Group > then click Edit.

 

nsg.pngasdasd