az network nsg rule list
SafeInspect NSG rules
az network nsg rule list -g <rg> --nsg-name <nsg> -o table
Lists NSG rules — remember they evaluate by priority; locate the deny that's biting you.
Examples
az network nsg rule list -g prod-rg --nsg-name web-nsg -o tableRules as a table
Syntax
az network nsg rule list -g rg --nsg-name name [-o table]
Before you run it
Read only.
Used when you see
Locked out of an Azure VM
1
See the whole flow →Verify the NSG allows the portRules apply by priority — look for an earlier Deny.
Related commands
- aws ec2 describe-security-groupsInspect security groups
- az vm listList Azure VMs
The same reference, with no signal at all
Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.
Get it free on the App Store