Azure Private DNS Resolver with Multiple Subscriptions with private DNS Zones

Robin Watt 0 Reputation points
2023-05-03T12:51:26.8766667+00:00

Good morning,

Have a question on a relatively open Azure environment in which we've had allowed our users/customers to build their own subscriptions and are now standardizing and wrangling things into a common frame. One item is handing OnPrem to Azure DNS using Azure Private DNS resolver. The core concern is that in many of these subscriptions people may have created multiple different resources with the same name and requiring the same private DNS Zones. We already know that Private Endpoints does not have a method to prevent duplication.

What would be the best way to resolve any conflicts when attempting to setup the Azure Private DNS resolver in such a way that it doesn't break or cause conflicts in existing Private DNS zones within Azure in regards to duplicated names and zones?

Thanks

Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
586 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Sina Salam 2,691 Reputation points
    2023-05-03T14:45:44.54+00:00

    @Robin Watt

    Welcome to Microsoft Q&A, thank you for posting your question here!

    Regarding your questions, you need a best way to resolve any conflicts when attempting to setup the Azure Private DNS, to avoid conflicts in existing Private DNS zones within Azure.

    To eliminate conflicts in existing Private DNS zones within Azure, you can use the following steps:

    • Create a new private DNS zone.
    • Move all conflicting records from the existing zone to the new zone.
    • Update the virtual network links to use the new private DNS zone.
    • Delete the conflicting records from the old zone.
    • You can also use Azure Private Endpoint DNS configuration to resolve conflicts between virtual networks.

    You can read more from the following links:

    1. https://learn.microsoft.com/en-us/azure/private-link/private-endpoint-dns
    2. https://learn.microsoft.com/en-us/azure/dns/dns-faq-private
    3. https://learn.microsoft.com/en-us/azure/dns/private-dns-privatednszone
    4. https://dev.to/kaiwalter/using-azure-private-links-and-private-dns-zones-with-globally-distributed-resources-4ce3
    5. https://stackoverflow.com/questions/73455572/protect-an-azure-private-dns-zone-against-accidental-deletion-without-resource-l

    Also, about your statement: Private Endpoints does not have a method to prevent duplication.

    To prevent duplication in private endpoint azure, you can use duplicate detection.

    Duplicate detection helps keep track of the application-controlled MessageId of all messages sent into a queue or topic during a specified time window. If any new message is sent with MessageId that was logged during the time window, the message is reported as accepted (the send operation succeeds), but the newly sent message is ignored and dropped as a duplicate.

    You can also set up duplicate detection rules to keep your data clean.

    You can use the below links to read more:

    https://learn.microsoft.com/en-us/azure/private-link/manage-private-endpoint?tabs=manage-private-link-powershell

    https://learn.microsoft.com/en-us/azure/service-bus-messaging/duplicate-detection

    Hope this is helpful.

    Kindly let me know if the above helps or you need further assistance or explanation on this issue.

    Best Regards,

    Sina

    0 comments No comments

  2. KapilAnanth-MSFT 33,646 Reputation points Microsoft Employee
    2023-05-04T05:23:50.8266667+00:00

    @Robin Watt

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.

    I understand that you would like to organize your Azure DNS Zones and Azure Private DNS resolvers.

    There are multiple ways to do this, I will list the most common ones here.

    This is same as any other resource.

    Use Tags for each project

    Use Resource Groups for each project (instead of resource)

    • This way, you can make sure the users or clients only deploy and use resources that are deployed in their respective resource groups.

    Use RBAC

    • The above two methods require users to be compliant and not exploit their access.
    • However, using RBAC can eliminate users from different projects accessing/modifying resources from a different client/project and also prevent deploying unnecessary resources.
    • Make sure users/clients have only Minimum Required level of access to resources.
    • RBAC can be applied to individual resources or Resource Groups. Roles applied at Resource group level are automatically inherited to resources contained.
    • You can also fine tune the individual resource level access.
    • E.g. UserA can access only PrivateDNSZones deployed in RGA while UserA cannot access PrivateDNSZones deployed in RGB even though they have the same name and properties.

    Now, in your case,

    • The user who is in charge of configuring the Private DNS zone should only have access to Private DNS Zones that are required for this configuration and not different Zones.
    • This way, we can make sure we do not link an unexpected Zone.

    Kindly let us know if this helps or you need further assistance on this issue.

    Thanks,

    Kapil


    Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.

    0 comments No comments