Azure Front Door - 如何添加地理过滤策略?
Azure Front Door - How to add geo filtering policy?
我想为美国以外的国家/地区应用地理过滤器到 Azure Front Door。
我已经应用了 waf 策略(在 microsoft docs 之后),但我没有得到想要的结果。所有流量似乎都被拒绝了。如果我尝试不同的国家代码,似乎所有流量都被允许。
这是我正在努力实施的拒绝政策示例。如果我应用此规则并通过 locabrowser 进行测试,则允许流量。
我正在通过使用 locabrowser 模拟来自不同位置的流量来测试这个理论。
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"frontdoorwebapplicationfirewallpolicies_DenyChinaWafPolicy_name": {
"defaultValue": "DenyChinaWafPolicy",
"type": "String"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.Network/frontdoorwebapplicationfirewallpolicies",
"apiVersion": "2018-08-01",
"name": "[parameters('frontdoorwebapplicationfirewallpolicies_DenyChinaWafPolicy_name')]",
"location": "Global",
"properties": {
"policySettings": {
"enabledState": "Enabled",
"mode": "Prevention"
},
"customRules": {
"rules": [
{
"name": "geoFilterRule",
"priority": 1,
"ruleType": "MatchRule",
"rateLimitDurationInMinutes": 1,
"rateLimitThreshold": 0,
"matchConditions": [
{
"matchVariable": "RemoteAddr",
"operator": "GeoMatch",
"negateCondition": false,
"matchValue": [
"CH"
]
}
],
"action": "Block"
}
]
},
"managedRules": {
"ruleSets": []
}
}
}
]
}
这对我也不起作用。无论我将动作设置为 allow 还是 block with matchVariable": "RemoteAddr"
and "operator": "GeoMatch"
, 看来这个策略并没有依赖在 "matchValue"
上,仅取决于操作。貌似WAF的Geo过滤还是不行
请注意the Azure web application firewall (WAF) for Azure Front Door is currently in public preview.
AFD 中的 Geo-filtering 目前已损坏。它包括所有国家而不是特定位置。已修复并将很快发布。修复更新后将在此处更新。
我想为美国以外的国家/地区应用地理过滤器到 Azure Front Door。
我已经应用了 waf 策略(在 microsoft docs 之后),但我没有得到想要的结果。所有流量似乎都被拒绝了。如果我尝试不同的国家代码,似乎所有流量都被允许。
这是我正在努力实施的拒绝政策示例。如果我应用此规则并通过 locabrowser 进行测试,则允许流量。
我正在通过使用 locabrowser 模拟来自不同位置的流量来测试这个理论。
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"frontdoorwebapplicationfirewallpolicies_DenyChinaWafPolicy_name": {
"defaultValue": "DenyChinaWafPolicy",
"type": "String"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.Network/frontdoorwebapplicationfirewallpolicies",
"apiVersion": "2018-08-01",
"name": "[parameters('frontdoorwebapplicationfirewallpolicies_DenyChinaWafPolicy_name')]",
"location": "Global",
"properties": {
"policySettings": {
"enabledState": "Enabled",
"mode": "Prevention"
},
"customRules": {
"rules": [
{
"name": "geoFilterRule",
"priority": 1,
"ruleType": "MatchRule",
"rateLimitDurationInMinutes": 1,
"rateLimitThreshold": 0,
"matchConditions": [
{
"matchVariable": "RemoteAddr",
"operator": "GeoMatch",
"negateCondition": false,
"matchValue": [
"CH"
]
}
],
"action": "Block"
}
]
},
"managedRules": {
"ruleSets": []
}
}
}
]
}
这对我也不起作用。无论我将动作设置为 allow 还是 block with matchVariable": "RemoteAddr"
and "operator": "GeoMatch"
, 看来这个策略并没有依赖在 "matchValue"
上,仅取决于操作。貌似WAF的Geo过滤还是不行
请注意the Azure web application firewall (WAF) for Azure Front Door is currently in public preview.
Geo-filtering 目前已损坏。它包括所有国家而不是特定位置。已修复并将很快发布。修复更新后将在此处更新。