Private Endpoint replying with a public IP

Bilocca Glenn 46 Reputation points
2023-05-24T06:41:35.17+00:00

To whom it may concern,

I have an issue when doing an NSlookup from an VM to a SQL as a service. Practically i have created an endpoint in order to make them communicate with each other however when i try to ping the local server sql name the public ip is returning and thus when i try to connect with SQL Management studio it is failing.

When i am trying to do an nslookup the following is returing :

C:\Users\azureadmin>nslookup id-thereforesql.privatelink.database.windows.net
Server:  corp3-lk.corp.root.gov.mt
Address:  10.81.0.4

Non-authoritative answer:
Name:    cr4.westeurope1-a.control.database.windows.net
Address:  104.40.168.105
Aliases:  id-thereforesql.privatelink.database.windows.net
          dataslice9.westeurope.database.windows.net
          dataslice9westeurope.trafficmanager.net

The only time that it is returning the proper IP when the wireserver is included :

  • C:\Users\azureadmin>nslookup id-thereforesql.privatelink.database.windows.net 168.63.129.16
  • Server: UnKnown
  • Address: 168.63.129.16
  • Non-authoritative answer:
  • Name: id-thereforesql.privatelink.database.windows.net
  • Address: 10.76.143.165

I have no Azure DNS as server configured and would like to keep it that way.

N.B Obviously if i do the change in the host file it works as well.

Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
624 questions
Azure Private Link
Azure Private Link
An Azure service that provides private connectivity from a virtual network to Azure platform as a service, customer-owned, or Microsoft partner services.
483 questions
{count} votes

Accepted answer
  1. KapilAnanth-MSFT 39,206 Reputation points Microsoft Employee
    2023-05-24T07:16:04.0266667+00:00

    @Bilocca Glenn

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

    You are using a custom DNS server "10.81.0.4" and not Azure Provided DNS "168.63.129.16" for default DNS queries.

    Can you please let me know where this server "10.81.0.4" is hosted?

    Depending on that, you have various options here.

    • If this is hosted in Azure, then you have to create a conditional forwarder for the zone "database.windows.net" and forward it to Azure Provided DNS "168.63.129.16"
    • In case this is hosted in OnPrem,
      • You will be required to use a DNS Forwarder deployed into Azure
      • And make the OnPrem DNS server forward requests for "database.windows.net" to this Azure custom DNS server
      • Configure this Azure custom DNS server to further forward it to Azure Provided DNS "168.63.129.16"
      • Refer : Workloads using a DNS forwarder

    In case you don't want to deploy a custom DNS server in Azure, you can consider Azure DNS Private Resolver

    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.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful