|
| 1 | +--- |
| 2 | +title: Quickstart - Create an Azure private DNS resolver using the Azure portal |
| 3 | +description: In this quickstart, you create and test a private DNS resolver in Azure DNS. This article is a step-by-step guide to create and manage your first private DNS resolver using the Azure portal. |
| 4 | +services: dns |
| 5 | +author: greg-lindsay |
| 6 | +ms.author: greglin |
| 7 | +ms.date: 05/11/2022 |
| 8 | +ms.topic: quickstart |
| 9 | +ms.service: dns |
| 10 | +ms.custom: mode-ui |
| 11 | +#Customer intent: As an experienced network administrator, I want to create an Azure private DNS resolver, so I can resolve host names on my private virtual networks. |
| 12 | +--- |
| 13 | + |
| 14 | +# Quickstart: Create an Azure private DNS Resolver using the Azure portal |
| 15 | + |
| 16 | +This quickstart walks you through the steps to create an Azure DNS Private Resolver (Public Preview) using the Azure portal. If you prefer, you can complete this quickstart using [Azure PowerShell](private-dns-getstarted-powershell.md). |
| 17 | + |
| 18 | +Azure DNS Private Resolver enables you to query Azure DNS private zones from an on-premises environment, and vice versa, without deploying VM based DNS servers. You no longer need to provision IaaS based solutions on your virtual networks to resolve names registered on Azure private DNS zones. You can configure conditional forwarding of domains back to on-premises, multi-cloud and public DNS servers. For more information, including benefits, capabilities, and regional availability, see [What is Azure DNS Private Resolver](dns-private-resolver-overview.md). |
| 19 | + |
| 20 | +## Prerequisites |
| 21 | + |
| 22 | +An Azure subscription is required. |
| 23 | +- If you don't already have an Azure subscription, you can create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F). |
| 24 | + |
| 25 | +## Register the Microsoft.Network provider namespace |
| 26 | + |
| 27 | +Before you can use **Microsoft.Network** services with your Azure subscription, you must register the **Microsoft.Network** namespace: |
| 28 | + |
| 29 | +1. Select the **Subscription** blade in the Azure portal, and then choose your subscription by clicking on it. |
| 30 | +2. Under **Settings** select **Resource Providers**. |
| 31 | +3. Select **Microsoft.Network** and then select **Register**. |
| 32 | + |
| 33 | +## Create a resource group |
| 34 | + |
| 35 | +First, create or choose an existing resource group to host the resources for your DNS resolver. The resource group must be in a [supported region](dns-private-resolver-overview.md#regional-availability). In this example, the location is **West Central US**. To create a new resource group: |
| 36 | + |
| 37 | +1. Select [Create a resource group](https://ms.portal.azure.com/#create/Microsoft.ResourceGroup). |
| 38 | +2. Select your subscription name, enter a name for the resource group, and choose a supported region. |
| 39 | +3. Select **Review + create**, and then select **Create**. |
| 40 | + |
| 41 | +  |
| 42 | + |
| 43 | +## Create a virtual network |
| 44 | + |
| 45 | +Next, add a virtual network to the resource group that you created, and configure subnets. |
| 46 | + |
| 47 | +1. Select the resource group you created, select **Create**, select **Networking** from the list of categories, and then next to **Virtual network**, select **Create**. |
| 48 | +2. On the **Basics** tab, enter a name for the new virtual network and select the **Region** that is the same as your resource group. |
| 49 | +3. On the **IP Addresses** tab, modify the **IPv4 address space** to be 10.0.0.0/8. |
| 50 | +4. Select **Add subnet** and enter the subnet name and address range: |
| 51 | + - Subnet name: snet-inbound |
| 52 | + - Subnet address range: 10.0.0.0/28 |
| 53 | + - Select **Add** to add the new subnet. |
| 54 | +5. Select **Add subnet** and configure the outbound endpoint subnet: |
| 55 | + - Subnet name: snet-outbound |
| 56 | + - Subnet address range: 10.1.1.0/28 |
| 57 | + - Select **Add** to add this subnet. |
| 58 | +6. Select **Review + create** and then select **Create**. |
| 59 | + |
| 60 | +  |
| 61 | + |
| 62 | +## Create a DNS resolver inside the virtual network |
| 63 | + |
| 64 | +1. To display the **DNS Private Resolvers** resource during public preview, open the following [preview-enabled Azure portal link](https://go.microsoft.com/fwlink/?linkid=2194569). |
| 65 | +2. Search for and select **DNS Private Resolvers**, select **Create**, and then on the **Basics** tab for **Create a DNS Private Resolver** enter the following: |
| 66 | + - Subscription: Choose the subscription name you're using. |
| 67 | + - Resource group: Choose the name of the resource group that you created. |
| 68 | + - Name: Enter a name for your DNS resolver (ex: mydnsresolver). |
| 69 | + - Region: Choose the region you used for the virtual network. |
| 70 | + - Virtual Network: Select the virtual network that you created. |
| 71 | + |
| 72 | + Don't create the DNS resolver yet. |
| 73 | + |
| 74 | +  |
| 75 | + |
| 76 | +3. Select the **Inbound Endpoints** tab, select **Add an endpoint**, and then enter a name next to **Endpoint name** (ex: myinboundendpoint). |
| 77 | +4. Next to **Subnet**, select the inbound endpoint subnet you created (ex: snet-inbound, 10.0.0.0/28) and then select **Save**. |
| 78 | +5. Select the **Outbound Endpoints** tab, select **Add an endpoint**, and then enter a name next to **Endpoint name** (ex: myoutboundendpoint). |
| 79 | +6. Next to **Subnet**, select the outbound endpoint subnet you created (ex: snet-outbound, 10.1.1.0/28) and then select **Save**. |
| 80 | +7. Select the **Ruleset** tab, select **Add a ruleset**, and enter the following: |
| 81 | + - Ruleset name: Enter a name for your ruleset (ex: myruleset). |
| 82 | + - Endpoints: Select the outbound endpoint that you created (ex: myoutboundendpoint). |
| 83 | +8. Under **Rules**, select **Add** and enter your conditional DNS forwarding rules. For example: |
| 84 | + - Rule name: Enter a rule name (ex: contosocom). |
| 85 | + - Domain Name: Enter a domain name with a trailing dot (ex: contoso.com.). |
| 86 | + - Rule State: Choose **Enabled** or **Disabled**. The default is enabled. |
| 87 | + - Select **Add a destination** and enter a desired destination IPv4 address (ex: 11.0.1.4). |
| 88 | + - If desired, select **Add a destination** again to add another destination IPv4 address (ex: 11.0.1.5). |
| 89 | + - When you're finished adding destination IP addresses, select **Add**. |
| 90 | +9. Select **Review and Create**, and then select **Create**. |
| 91 | + |
| 92 | +  |
| 93 | + |
| 94 | + This example has only one conditional forwarding rule, but you can create many. Edit the rules to enable or disable them as needed. |
| 95 | + |
| 96 | +  |
| 97 | + |
| 98 | + After selecting **Create**, the new DNS resolver will begin deployment. This process might take a minute or two, and you'll see the status of each component as it is deployed. |
| 99 | + |
| 100 | +  |
| 101 | + |
| 102 | +## Create a second virtual network |
| 103 | + |
| 104 | +Create a second virtual network to simulate an on-premises or other environment. To create a second virtual network: |
| 105 | + |
| 106 | +1. Select **Virtual Networks** from the **Azure services** list, or search for **Virtual Networks** and then select **Virtual Networks**. |
| 107 | +2. Select **Create**, and then on the **Basics** tab select your subscription and choose the same resource group that you have been using in this guide (ex: myresourcegroup). |
| 108 | +3. Next to **Name**, enter a name for the new virtual network (ex: myvnet2). |
| 109 | +4. Verify that the **Region** selected is the same region used previously in this guide (ex: West Central US). |
| 110 | +5. Select the **IP Addresses** tab and edit the default IP address space. Replace the address space with a simulated on-premises address space (ex: 12.0.0.0/8). |
| 111 | +6. Select **Add subnet** and enter the following: |
| 112 | + - Subnet name: backendsubnet |
| 113 | + - Subnet address range: 12.2.0.0/24 |
| 114 | +7. Select **Add**, select **Review + create**, and then select **Create**. |
| 115 | + |
| 116 | +  |
| 117 | + |
| 118 | +  |
| 119 | + |
| 120 | +## Test the private resolver |
| 121 | + |
| 122 | +You should now be able to send DNS traffic to your DNS resolver and resolve records based on your forwarding rulesets, including: |
| 123 | +- Azure DNS private zones linked to the virtual network where the resolver is deployed. |
| 124 | +- DNS zones in the public internet DNS namespace. |
| 125 | +- Private DNS zones that are hosted on-premises. |
| 126 | + |
| 127 | +## Next steps |
| 128 | + |
| 129 | +> [!div class="nextstepaction"] |
| 130 | +> [What is Azure private DNS Resolver?](dns-private-resolver-overview.md) |
0 commit comments