I need to change the action on some managed rules in my WAF policy in Azure using AZ CLI but I can't with the commands I have used.
I tried some commands but any doesn't work.
I need help. I just need to change the action on some rules from the OWASP 3.2 ruleset in my WAF policy in Azure. And I must do this action with AZ CLI or with some other mechanism that can be automated.
I tried change the action for the rules with these commands:
Also I tried az network application-gateway waf-policy update --managed-rules, but I don't understand very well this command.
I just need to change the action on some rules from the OWASP 3.2 ruleset in my WAF policy in Azure. And I must do this action with AZ CLI or with some other mechanism that can be automated.
Please I need some help.
I need to change the action on some managed rules in my WAF policy in Azure using AZ CLI.
You can update the action for each rule using the az network application-gateway waf-policy managed-rule rule-set update
command. Specify the rule IDs
and the desired action for each rule.
az network application-gateway waf-policy managed-rule rule-set update --policy-name "<Policy-Name>" -g "<Resource-Group-Name>" --type Microsoft_BotManagerRuleSet --version 3.2 --group-name REQUEST-921-PROTOCOL-ATTACK --rule rule-id=921130 --rule rule-id=921160
Output:
Successfully updated Rule ID
and ruleset type
.
Make sure you have the latest version of the Azure CLI
installed to access the required commands and functionality.
Reference: az network application-gateway waf-policy managed-rule rule-set update and Doc2