CmdID / az / az network / az network nsg / az network nsg rule
az network nsg rule create
Create a network security group rule. Azure CLI reference
15 options Its page in the Azure CLI reference
Options
--accessNetwork traffic is allowed or denied.--descriptionDescription for this rule.--destination-address-prefixThe destination address prefix.--destination-address-prefixes, --source-address-prefixesSpace-separated list of CIDR prefixes or IP ranges.--destination-application-security-groupsApplication security group specified as destination.--destination-port-rangeThe destination port or range.--destination-port-ranges, --source-port-rangesSpace-separated list of ports or port ranges between 0-65535.--directionDirection of the rule.--name, -nName of the network security group rule.--nsg-nameName of the network security group.--priorityPriority of the rule.--protocolNetwork protocol this rule applies to.--source-address-prefixThe CIDR or source IP range.--source-application-security-groupsApplication security group specified as source.--source-port-rangeThe source port or range.