Reputation: 6124
Is there a way to list the "Inbound port rules" for a virtual machine from the command line (az cli) in Azure ?
I tried az vm show -n vm-name -g resource-group-name --show-details
but it does not display the required information.
Edit : Based on the responses, I feel the need to provide more information :
Networking
Inbound port rules
Upvotes: 1
Views: 1358
Reputation: 106
Using Cli, specify the parameters below and use any custom options that relates to what you need.
az network nsg rule create --name --nsg-name --priority --resource-group [--access {Allow, Deny}] [--description] [--destination-address-prefixes] [--destination-asgs] [--destination-port-ranges] [--direction {Inbound, Outbound}] [--protocol {*, Ah, Esp, Icmp, Tcp, Udp}] [--source-address-prefixes] [--source-asgs] [--source-port-ranges] [--subscription]
https://learn.microsoft.com/en-us/cli/azure/network/nsg/rule?view=azure-cli-latest
You can refer to the link below if you have any difficulties. Don’t forget to reply to this comment and I will be there to help.
Upvotes: 1