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 on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).
Get it free on the App Store