对来自任何 IP 地址、用户代理对的登录页面的请求进行速率限制 - AWS WAFAWS Firewall Manager、和 AWS Shield Advanced

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

对来自任何 IP 地址、用户代理对的登录页面的请求进行速率限制

如需限制超过限制的 IP 地址、用户代理对登录网站页面的请求数量,请将请求聚合设置为自定义键,并提供聚合条件。

以下 JSON 列表显示了此规则配置的示例。在此示例中,我们将每个 IP 地址、用户代理对的请求限制设置为在任何五分钟内发出 100 个请求。

{ "Name": "test-rbr", "Priority": 0, "Action": { "Block": {} }, "VisibilityConfig": { "SampledRequestsEnabled": true, "CloudWatchMetricsEnabled": true, "MetricName": "test-rbr" }, "Statement": { "RateBasedStatement": { "Limit": 100, "EvaluationWindowSec": 300, "AggregateKeyType": "CUSTOM_KEYS", "CustomKeys": [ { "Header": { "Name": "User-Agent", "TextTransformations": [ { "Priority": 0, "Type": "NONE" } ] } }, { "IP": {} } ], "ScopeDownStatement": { "ByteMatchStatement": { "FieldToMatch": { "UriPath": {} }, "PositionalConstraint": "STARTS_WITH", "SearchString": "/login", "TextTransformations": [ { "Type": "NONE", "Priority": 0 } ] } } } } }