速率限制從任何 IP 地址,用戶代理對登錄頁面的請求 - AWS WAF, AWS 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 } ] } } } } }