azure - 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": []
}
}
}
]
}
解决方案
AFD 中的地理过滤目前已损坏。它包括所有国家而不是特定位置。已修复并将很快发布。修复更新后将在此处更新。
推荐阅读
- android - 如何从 qt qml 中的 android 设置中设置虚拟键盘的样式
- r - 如何将图标/图像添加到图例
- apache-kafka - 保留 7 天的主题的 max.compaction.lag.ms
- python - Flask:Jsonify 响应,然后使用响应调用第三方 API - 怎么做?
- wordpress - 我在 wordpress 中创建了一个名为 aboutUs 的页面,并在 functions.php 存在但未显示的文件夹中创建了一个 aboutUs.php
- javascript - 更改组件的样式但在 javascript 中使用不同的元素
- unity3d - 统一集成 agora RTM SDK
- php - 使用循环将图像插入wordpress动态字段
- javascript - Youtube iframe 使用自定义控件/在页面加载时切换静音/取消静音
- javascript - 如果使用 mongodb 匹配精确值,则返回记录