AWS WAF v2Old PlanNew PlanAdvancedLegacyFeature / Spec.
You can configure IP address rules to reference the IP addresses that are included in the specific header.
Reference: IP addresses
This article explains when to use the [IP address to use] option.
As stated in the IP addresses section, you can specify which IP addresses within the request to use in the IP addresses rule configuration. The same setting applies to both Allowlist and Denylist.
This is an option to use when you deploy CDN in front of the ALB and use WafCharm with a web ACL attached to the ALB.
As shown in the diagram above, ALB is positioned behind CloudFront or CDN, and WafCharm is used on the web ACL attached to the ALB. In this case, the requester's IP address, from ALB's point of view, will become CloudFront or CDN's IP address.
If you choose [Source IP] in the [IP address to use] option, WafCharm will be using the CDN's IP address in the dynamic denylist feature. To be more specific, if the dynamic denylist (signature re-matching) feature detects a request, the CDN's IP address will be added to the denylist.
If the CDN's IP address is added to the denylist with this feature, all requests that pass through the CDN will be blocked.
If you are deploying CDN in front of ALB, please consider taking either of the actions below to prevent CDN's IP addresses from being added to the denylist.