DNS is not resolving

ahmed ragab 61 Reputation points
2022-06-12T17:30:21.22+00:00

I have created a VM to be as IIS server for a website, so I installed DNS and IIS.
I created also the zone and A records which was enough to resolve the domain in my On-prime server.

Then I created an Azure DNS zone ref: https://learn.microsoft.com/azure/dns/dns-domain-delegation
Here are the records of the Azure DNS Zone
210517-iii.png

the NS and SOA records are the defaults and the two A records I created myself.

What do I need further? to resolve the domain to the Azure server? I tested the website inside the VM it is working locally good, so it is a problem isin DNS and IP.
I mean, the website is not resolving even if I wrote the IP:port it will not open the website
what is the problem ??

Note: while I'm installing DNS on the VM it says that it is noticed that there is no Public IP assigned and it was advising to assign Public IP, but I thought that is because the DNS service only is reading the local IP of the VM which is like 10.0.0.4
I think there is a virtual adapter which is leading to the public... or do I need to assign the public IP in the NIC of the VM ??

Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
599 questions
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,164 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,162 questions
{count} votes

Accepted answer
  1. Jackson Martins 9,646 Reputation points MVP
    2022-06-12T22:56:52.177+00:00

    Hi!
    Try to add @ and * with type A and point to the VM’s IP Address, wait for propagation (but you can add a entry in the hosts file C:\Windows\System32\drivers\etc, to make a test)

    Get in touch if you need more help with this issue.

    --please don't forget to "Accept the answer" if the reply is helpful--


2 additional answers

Sort by: Most helpful
  1. ahmed ragab 61 Reputation points
    2022-06-12T22:16:02.307+00:00

    Thanks @Jackson Martins for your reply, Yes I have waited the proper time but not responding
    Regarding A www record, OK, I deleted it and remains only the default records.
    The dnschecker.org test showing no propagation at all, this is the problem

    Even If I try to visit IP:port, it should give me the website but it is not.

    My question is, when I created Azure DNS Zone, How the zone will know that I want to refer to my Azure VM ?
    I put Azure Name servers (from Azure zone) under the domain (in the registrar)
    But how Azure zone will know that my server is this certain VM ? that's why I put A record with my VM-Public_ip , but I removed

    0 comments No comments

  2. ahmed ragab 61 Reputation points
    2022-06-12T22:24:23.853+00:00

    If I tryed >> nslookup -type=SOA contoso.com (replacing my domain)
    It is Giving :
    Server: Unknown
    IP: The IP of DNS server of the VM (I think that's good)

    So why it is not working?
    Should I remove DNS service from the VM and let azure DNS work alone ?