Adding a DNS ANAME on Windows Server Core

I’m getting ready to have an integrated environment on my server. I have a Windows domain controller up and running and I’m about to get my CentOS 7 join the domain.

Before I can go on, CentOS 7 needs to be able to communicate with the DNS server that I created on the Windows Server Core. The IP address of the DNS server in my network is And the domain name is

A DNS server can have multiple zones. Let’s see what kind of zones I have by executing the following command.

$ Get-DnsServerZone

I have the following zones on my DNS server.

Now let’s see what DNS ANAMEs we have.

$ Get-DnsServerResourceRecord -ZoneName ""

It gives you the list of DNS entries in the zone. I have a CentOS 7 host that I have assigned a static IP address to and I’m going to make sure I can resolve it.

$ Add-DnsServerResourceRecordA -ZoneName "" -AllowUpdateAny -Name "dockerhost01" -IPv4Address ""

By executing the command above, as long as a machine can talk to the DNS server, it can resolve to In other words, is mapped to

If necessary, you can remove the DNS entry by executing the following command.

$ Remove-DnsServerResourceRecord -ZoneName "" -RRType "A" -Name "dockerhost01"

Next, I’m going to ssh into my CentOS 7 VM and then configure it so that it asks the DNS server on Windows Server Core to resolve names.

# vi /etc/sysconfig/network-script/ifcfg-[your network interface]

In the text file, add the following entry. Change the IP address and the domain name to fit your environment, obviously.


I have DNS1 point to my Windows Server Core with DNS server. And DNS2 and DNS3 are pointing to OpenDNS. Save and get out by :wq in vi.

Restart the network by executing the following command.

# systemctl restart network

Once that’s done, the system writes these data in /etc/resolv.conf. Check it by executing the following command.

# cat /etc/resolv.conf

Now try pinging and the IP address is resolved and get a response.

Now we are ready to get this host to join the Windows domain!

Leave a Reply

Your email address will not be published.