100 Days of Cloud (Azure)- Day 27 : NSG Not Recognizing VNet Access

Hello Team,

I am currently working on the lab “Jour 27” from the 100 Days of Cloud (Azure) course. I have followed all instructions carefully:

  • Created a private VNet (datacenter-priv-vnet) with a subnet (datacenter-priv-subnet) in the Central US region.
  • Created a VM (datacenter-priv-vm) in the subnet with no public IP.
  • Created an NSG (datacenter-priv-nsg) and added an inbound rule to allow SSH only from within the VNet (source-address-prefix: VirtualNetwork).
  • Attached the NSG to the VM’s NIC.

When I check the VM and NSG configuration, everything is correct:

  • The VM has a private IP in the subnet (10.0.1.4).
  • The NSG inbound rule allows TCP port 22 from the VNet.
  • The NSG is correctly associated with the VM’s NIC.

Despite this, the lab validator keeps reporting the following error:

NSG ‘datacenter-priv-nsg’ does not allow access from the VNet’s CIDR block ‘10.0.0.0/16’

I believe this may be an issue with the lab validation logic rather than my configuration, as all steps have been implemented correctly according to the instructions.

Could you please review the lab validator for Jour 27 to confirm that it correctly recognizes NSG rules allowing access from the VNet?

I just did the lab and succeeded; I’d guess the problem is how you set up the NSG. It should have a source and destination network of 10.0.0.0/16 (if you used the defaults for the vnet), and the private subnet you created should be linked to the NSG. Then, when you assign the VM to the private subnet, it will inherit the NSG, and things should work.

See this guide to the task – I found it helpful in doing the task.