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
-[Azure Policy for Custom DNS](#azure-policy-for-custom-dns)
7
+
8
+
## DNS Forwarding VMSS
9
+
This ARM template deploys a virtual machine scale set consisting of 3 Ubuntu 18.04 VMs with dnsmasq installed and configured. It is deployed in a stateless configuration, so the VMs can automatically patch and self-heal in the event of a failed instance.
10
+
11
+
### Deployment instructions
12
+
1. Modify parameters.json as appropriate for your environment
13
+
-`vmssName`: name of the scaleset
14
+
- <details>
15
+
<summary>
16
+
<code>vnetId</code>: the full resource ID of the virtual network to use
17
+
</summary>
18
+
<ul>
19
+
<li>via <ahref="https://portal.azure.com/">Azure Portal</a>: found in the properties blade of the virtual network</li>
20
+
<li>via <ahref="https://docs.microsoft.com/en-us/cli/azure/">Azure CLI</a>: <code>az network vnet show --resource-group rg-hub-network-centralus --name vnet-hub-centralus-001 --query id -o tsv</code></li>
-`stgAcctName`: the name of the storage account to use for boot diagnostics
26
+
-`sshUser`: the username to use for admin access via SSH
27
+
-`sshKey`: the public key to assign to `sshUser`
28
+
2. Modify customData.json to appropriately set up dnsmasq
29
+
- add `server=/domain/nameserverIP` lines for each domain you want to forward to on-premises (if you have multiple nameservers, use one line per nameserver)
30
+
- if you have multiple domains to forward to the same nameserver, you can use the format `server=/domain1/domain2/nameserverIP`
31
+
- leave the last server line intact to forward any non-matching queries to Azure DNS: `server=168.63.129.16`
This policy will automatically deploy a link from any private DNS zones in scope to the hub vnet where your DNS forwarders are running if one does not already exist. This is critical for having your DNS servers able to resolve private DNS zones in a spoke virtual network.
This policy will ensure that all virtual networks deployed have the DNS servers set to the values specified so that DNS lookups forward to on-premises and private DNS zones correctly.
63
+
64
+
## On-premises DNS setup
65
+
66
+
Also provided is [a script](ad-dns/Add-AzureDNSFowarderZones.ps1) that will forward all currently used Azure Private Link DNS domains from an on-premises Active Directory DNS server to the forwarders deployed above. If you create custom private DNS zones in Azure, you will need to set your forwarding up in the same way if you want them resolvable from on premises.
"displayName": "Private DNS - deployINE virtual network link",
4
+
"policyType": "Custom",
5
+
"mode": "All",
6
+
"description": "Automatically create a link to a selected virtual network when a private DNS zone is created. This is useful when DNS zones need to be linked to a hub virtual network where DNS forwarders have been deployed.",
7
+
"parameters": {
8
+
"virtualNetworkLinkName": {
9
+
"type": "String",
10
+
"metadata": {
11
+
"displayName": "Virtual Network Link Name",
12
+
"description": "The name of the virtual network link to create"
13
+
}
14
+
},
15
+
"targetVnet": {
16
+
"type": "String",
17
+
"metadata": {
18
+
"displayName": "Target virtual network",
19
+
"description": "The target virtual network for Private DNS zone connections"
0 commit comments