azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

Azure Firewall Network rule creation with an ip prefix

Open saisujithreddym opened this issue 3 years ago • 1 comments

Picture1

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Related command

az network firewall network-rule create

Describe the bug

Looks like CLI is not taking an ipprefix in the network rules during the firewall creation

To Reproduce

Expected behavior

Environment summary

Additional context

saisujithreddym avatar Sep 22 '22 20:09 saisujithreddym

@necusjz for awareness

yonzhan avatar Sep 23 '22 00:09 yonzhan

Cannot reproduce and I have tried almost the same parameters as yours, but works:

1. az network firewall create -n ethan-af -g ethan-rg
2. az network firewall network-rule create -n ethan-rule -c ethan-cc -f ethan-af -g ethan-rg --dest-addr * --destination-ports * --protocols Any --priority 300 --source-addresses 10.0.0.0/8 --action Allow

{
  "description": null,
  "destinationAddresses": [
    "*"
  ],
  "destinationFqdns": [],
  "destinationIpGroups": [],
  "destinationPorts": [
    "*"
  ],
  "name": "ethan-rule",
  "protocols": [
    "Any"
  ],
  "sourceAddresses": [
    "10.0.0.0/8"
  ],
  "sourceIpGroups": []
}

necusjz avatar Dec 20 '22 10:12 necusjz