DNS automatically answers.

Doria 1,246 Reputation points
2020-09-28T15:37:58.423+00:00

Hi everyone!

Is it possible to program DNS on Windows Server 2019 to answer whatever question is received in a zone name to a predetermined name (record)? Example:

zone name (lab.com).
host1 (A record).

So, host1.lab.com is a valid query! I would like to make *.lab.com goes automatically to host1.lab.co, always. Is it possible? Or do I have to create a CNAME for each possible alternative name?

If not, is it possible using any other OS service together with DNS?

Hope I was clear enough.

Windows DHCP
Windows DHCP
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.DHCP: Dynamic Host Configuration Protocol (DHCP). A communications protocol that lets network administrators manage centrally and automate the assignment of Internet Protocol (IP) addresses in an organization's network.
1,040 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Gloria Gu 3,901 Reputation points
    2020-09-29T05:45:42.89+00:00

    @Doria Hi,

    Thank you for posting in Q&A!

    1. Firstly, A CNAMErecord, is a record that points to another domain address rather than an IP address. In your situation, you can only create a CNAME RR like this:
      29051-20.png
      So it couldn' be realized by creating a CNAME RR.
    2. The request can be realize by changing the domain A RR to the host.lab.com's IP address. In normal situation, the domain A RR(same as parent folder) is the DC's IP address. When clients query the domain name, it will automaticallt point to the DC.
      I have done tests in my own environment. The "lab.com" DC's IP address is 192.168.1.1" "host.lab.com"is "192.168.1.12"
      when I change the domain A RR to the "client.lab.com", the query for"lab.com" will become the "client.lab.com" IP address"192.168.1.12".
      28977-19.png

    However, it is not suggested to use this method:
    (1)This A record is a dynamic record, and it will be automatically registered again after deletion.
    (2)Doing this configuration on DNS will solve the current problem, but in the long run, the impact on the AD environment is also an important factor to consider.

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Doria 1,246 Reputation points
    2020-09-29T15:33:37.717+00:00

    Thanks for the update.

    I'm sorry, but I didn't quite understand your explanation: did you change the type A record of the host to the SOA (name zone authority) address, in other words to the DNS server IP address? That is it?

    Forget the Windows domain, let's imagine any primary name zone, not integrated with AD.

    Regards.


  3. Doria 1,246 Reputation points
    2020-09-29T17:04:53.223+00:00
    0 comments No comments

  4. Doria 1,246 Reputation points
    2020-09-30T16:02:26.713+00:00

    Well, we followed the article shared above and it worked.

    Now, any host name receives always the same answer (IP address).

    Look:

    29410-1.png29481-2.png


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.