Why can't I associate my NSGs to a NIC or subnet?

Henrique C 21 Reputation points
2022-02-12T01:09:31.287+00:00

I cannot associte NSGs to Subnets or NICs in my subscription. Why is it happening, the only way to have a functional NSG in my subscription is when I create de NSG during the VM creation. If I create an NSG from NSG resource it does not show the Subnet or Network Interface sections, it also doesn't show up on NICs and Subnets.

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,780 questions
0 comments No comments
{count} votes

Accepted answer
  1. Andreas Baumgarten 124K Reputation points MVP Volunteer Moderator
    2022-02-12T15:32:54.973+00:00

    Hi @Henrique C ,

    hmmmm. You created a Network Security Group (classic) which is not working together with the VMs/subnets created with ARM.

    173747-image.png

    This explains the issue.

    Please choose the Network Security Group in the Portal, create a new one and try again.

    173763-image.png

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Andreas Baumgarten

    1 person found this answer helpful.

6 additional answers

Sort by: Most helpful
  1. Andreas Baumgarten 124K Reputation points MVP Volunteer Moderator
    2022-02-12T01:28:08.45+00:00

    Hi @Henrique C ,

    the NSG is created in the same Azure Region and Azure Subscription with the vNet/subnet and the VM?

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Andreas Baumgarten

    0 comments No comments

  2. Henrique C 21 Reputation points
    2022-02-12T11:37:30.307+00:00

    Hi @Andreas Baumgarten , yes, same subscription, resource group and region. I've tryed more than once, recreated the resource group, vnet and NSG but nothing changes.

    0 comments No comments

  3. Andreas Baumgarten 124K Reputation points MVP Volunteer Moderator
    2022-02-12T13:16:50.553+00:00

    Hi @Henrique C ,

    if the NSG is created how do you associate the NSG with the subnet or VM NIC?
    Do you navigate to the NSG and associated the NSG to the Subnets or NICs?
    Or do you navigate to the subnet or NIC and associate the NSG with it?

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Andreas Baumgarten

    0 comments No comments

  4. Henrique C 21 Reputation points
    2022-02-12T14:21:39.49+00:00

    Hi @Andreas Baumgarten , when the NSG is created Azure portal doesn't show Subnet and Network Interface on the left so I can't pick up any resource to associate to it. If I try to associate the NSG from the resource, like a Subnet, the NSG will not show up.

    Please take a look a these images so you can visualize yourself the issue. Is it something with my subscription? I created this subscription to do some labs for certs, I already created vms, load balancers and haven't had an issue as far as I can remember but at that point I was still using the free credits.

    https://imgur.com/a/QYeKXLN

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.