Bird
0
0

Which JSON snippet correctly defines an AWS WAF rule to block requests from IP 192.0.2.0/24?

easy📝 Syntax Q3 of 15
AWS - Advanced Security
Which JSON snippet correctly defines an AWS WAF rule to block requests from IP 192.0.2.0/24?
A{"Name": "AllowIP", "Priority": 1, "Action": {"Allow": {}}, "Statement": {"IPSetReferenceStatement": {"ARN": "arn:aws:wafv2:region:account:ipset/AllowIPSet"}}}
B{"Name": "BlockIP", "Priority": 1, "Action": {"Allow": {}}, "Statement": {"IPSetReferenceStatement": {"ARN": "arn:aws:wafv2:region:account:ipset/BlockIPSet"}}}
C{"Name": "BlockIP", "Priority": 1, "Action": {"Count": {}}, "Statement": {"IPSetReferenceStatement": {"ARN": "arn:aws:wafv2:region:account:ipset/BlockIPSet"}}}
D{"Name": "BlockIP", "Priority": 1, "Action": {"Block": {}}, "Statement": {"IPSetReferenceStatement": {"ARN": "arn:aws:wafv2:region:account:ipset/BlockIPSet"}}}
Step-by-Step Solution
Solution:
  1. Step 1: Identify the action to block IP

    The rule must block requests, so Action must be Block.
  2. Step 2: Check IPSetReferenceStatement and ARN

    The ARN must point to the IP set containing 192.0.2.0/24. The name BlockIPSet matches blocking intent.
  3. Final Answer:

    JSON with Block action and correct IPSet ARN -> Option D
  4. Quick Check:

    Block IP rule uses Block action and IPSetReference = B [OK]
Quick Trick: Block action must be explicitly set to Block [OK]
Common Mistakes:
  • Using Allow instead of Block
  • Using Count action mistakenly
  • Wrong IPSet ARN or name

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes