You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/dns/dns-security-policy.md
+45-9Lines changed: 45 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,36 +21,72 @@ This article provides an overview of DNS security policy. Also see the following
21
21
22
22
## What DNS security policy?
23
23
24
-
DNS security policy offers the ability to filter and log DNS queries at the virtual network (VNet) level and view detailed DNS logs. Think of it like a DNS firewall for your cloud resources. You can allow, alert, or block name resolution of known or malicious domains. The logging capability enables you to gain detailed insight into your DNS traffic. DNS logs can be sent to a storage account, log analytics workspace, or event hubs.
24
+
DNS security policy offers the ability to filter and log DNS queries at the virtual network (VNet) level. With DNS security policy you can:
25
+
- Create rules to protect against DNS-based attacks by blocking block name resolution of known or malicious domains.
26
+
- Save and view detailed DNS logs to gain inside into your DNS traffic.
27
+
28
+
DNS logs can be sent to a storage account, log analytics workspace, or event hubs. You can choose to allow, alert, or block DNS queries.
25
29
26
30
A DNS security policy has the following associated elements and properties:
27
-
-**Location**: A security policy can only apply to VNets in the same region.
28
-
-**DNS traffic rules**: Rules that allow, block, or alert based on priority and domain lists. Rules can be enabled or disabled.
29
-
-**Virtual network links**: You can link one security policy per VNet. A security policy can be associated to multiple VNets.
30
-
-**DNS domain lists**: Location-based lists of DNS domains.
31
+
-**[Location](#location)**: The Azure region where the security policy is created and deployed.
32
+
-**[DNS traffic rules](#dns-traffic-rules)**: Rules that allow, block, or alert based on priority and domain lists. Rules can be enabled or disabled.
33
+
-**[Virtual network links](#virtual-network-links)**: A link that associates the security policy to a VNet. You can link one security policy per VNet. A single security policy can be associated to multiple VNets.
34
+
-**[DNS domain lists](#dns-domain-lists)**: Location-based lists of DNS domains.
31
35
32
36
DNS Security Policy can be configured using Azure PowerShell or the Azure portal.
33
37
34
38
### Location
35
39
36
-
You can create any number of security policies in the same region. In the following example, two polices are created in each of two different regions (East US and Central US). Keep in mind that the policy:VNet relationship is 1:N. When you associate a VNet with a security policy (via virtual network links), that VNet can't then be associated with another security policy. However, a single DNS security policy can be associated with multiple VNets in the same region.
40
+
A security policy can only apply to VNets in the same region. You can create any number of security policies in the same region. In the following example, two polices are created in each of two different regions (East US and Central US).
37
41
38
42

39
43
44
+
Keep in mind that >the policy:VNet relationship is 1:N. When you associate a VNet with a security policy (via virtual network links), that VNet can't then be associated with another security policy. A single DNS security policy can be associated with multiple VNets in the same region.
45
+
40
46
### DNS traffic rules
41
47
48
+
To display DNS traffic rules in the Azure portal, select a DNS security policy and then under **Settings**, select **DNS Traffic Rules**. See the following example:
49
+
50
+
[](./media/dns-security-policy/traffic-rules.png#lightbox)
51
+
52
+
- Rules are processed in order of **Priority** in the range 100-65000. Lower numbers are higher priority.
53
+
* If a domain name is blocked in a lower priority rule, and the same domain is allowed in a higher priority rule, the domain name is allowed.
54
+
* Rule priority takes precedence over the number of labels in a domain name. If contoso.com is allowed in a higher priority rule, then sub.contoso.com is allowed, even if sub.contoso.com is blocked in a lower priority rule.
55
+
- You can dynamically add and delete rules from the list. Be sure to **Save** after editing rules in the portal.
56
+
- During preview, up to 10 traffic rules are allowed per security policy. This limit will be increased to 100 for general availability.
57
+
- Multiple **DNS Domain Lists** are allowed per rule. You must have at least one DNS domain list.
58
+
- Each rule is associated with one of three **Traffic Actions**: **Allow**, **Block**, or **Alert**.
59
+
* Allow: Permit the query to the associated domain lists and log the query.
60
+
* Block: Block the query to the associated domain lists and log the block action.
61
+
* Alert: Permit the query to the associated domain lists and log an alert.
62
+
- Rules can be individually **Enabled** or **Disabled**.
63
+
42
64
### Virtual network links
43
65
66
+
DNS security policies only apply to VNets that are linked to the security policy. You can link a single security policy to multiple VNets, however a single VNet can only be linked to one DNS security policy. See the following example.
67
+
68
+
[](./media/dns-security-policy/virtual-network-links.png#lightbox)
69
+
70
+
You can only link VNets that are in the same region as the security policy. When you link a VNet to a DNS security policy using a virtual network link, the DNS security policy applies to all resources inside the VNet.
71
+
44
72
### DNS domain lists
45
73
74
+
DNS domain lists are lists of DNS domains that you associate to traffic rules. Select **DNS Domain Lists** under **Settings** for a DNS security policy to view the current domain lists associated with the policy. See the following example:
75
+
76
+
[](./media/dns-security-policy/domain-list.png#lightbox)
77
+
78
+
You can associate a domain list to multiple DNS traffic rules in different security policies.
79
+
80
+

81
+
82
+
When viewing a DNS domain list in the Azure portal, you can also select **Settings** > **Associated DNS Traffic Rules** to see a list of all traffic rules and thye associated DNS security policies that reference the DNS domain list.
83
+
84
+

46
85
47
86
## Requirements and restrictions
48
87
49
88
Virtual network restrictions:
50
89
- DNS security policies can only be applied to virtual networks in the same region as the DNS security policy.
51
-
- DNS security policy cannot be deleted unless the virtual network links under it are deleted.
0 commit comments