0
0
Azurecloud~10 mins

WAF with Application Gateway in Azure - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to enable the Web Application Firewall (WAF) on the Application Gateway.

Azure
az network application-gateway waf-config set --gateway-name myAppGateway --resource-group myResourceGroup --[1] Enabled
Drag options to blanks, or click blank then click option'
Afirewall-mode
Bwaf-policy
Cwaf-mode
Dwaf-enabled
Attempts:
3 left
💡 Hint
Common Mistakes
Using --firewall-mode instead of --waf-enabled
Using --waf-policy which is for policies, not enabling WAF
2fill in blank
medium

Complete the code to create a WAF policy with prevention mode.

Azure
az network application-gateway waf-policy create --name myWafPolicy --resource-group myResourceGroup --mode [1]
Drag options to blanks, or click blank then click option'
APrevention
BDetection
CMonitor
DBlock
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Detection' mode which only logs threats
Using 'Block' which is not a valid mode
3fill in blank
hard

Fix the error in the command to associate the WAF policy with the Application Gateway.

Azure
az network application-gateway update --name myAppGateway --resource-group myResourceGroup --[1] myWafPolicy
Drag options to blanks, or click blank then click option'
Awaf-policy
Bwaf-policy-id
Cwaf-policy-name
Dwaf-policy-resource
Attempts:
3 left
💡 Hint
Common Mistakes
Using --waf-policy with just the policy name
Using incorrect parameter names
4fill in blank
hard

Fill both blanks to configure custom rules in the WAF policy.

Azure
az network application-gateway waf-policy custom-rule create --policy-name myWafPolicy --resource-group myResourceGroup --name myRule --priority [1] --action [2] --rule-type MatchRule
Drag options to blanks, or click blank then click option'
A100
BAllow
CBlock
D200
Attempts:
3 left
💡 Hint
Common Mistakes
Using non-numeric priority
Using 'Allow' when the rule should block
5fill in blank
hard

Fill all three blanks to create a match condition for the custom WAF rule.

Azure
az network application-gateway waf-policy custom-rule condition create --policy-name myWafPolicy --resource-group myResourceGroup --rule-name myRule --match-variables [1] --operator [2] --match-values [3]
Drag options to blanks, or click blank then click option'
ARequestHeaders
BContains
CUser-Agent
DEquals
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Equals' when 'Contains' is needed
Using incorrect match variable