Configuring a DNS server on Windows Server 2012 or later

DNS (Domain Name System) is a system that lets you translate domain names into IP addresses and vice versa.

A DNS server is a network service that provides and maintains the operation of DNS. The DNS server is an easy and light service that can run on most machines. If you don’t intend to configure other roles and services on the target machine, the minimum configuration is enough.

Configuring the network adapter on the DNS server

Installing a DNS server requires a domain zone. You need to create a private network in your personal account and connect virtual machines to it.

After the machine is connected to both of the networks, it is important to remember which connection needs to be configured. Usually, a network adapter is setup by default from the very beginning with an access to the Internet. At the same time other additional network adapters have no Internet access until the configuration is performed manually:

By hovering the cursor over the network icon in the system tray, you can find a tooltip with brief information about networks. Following the example above, you can see that the joined network is Network 3.

Perform a series of actions:

  • Right-click Start and select Network Connections from the drop-down menu;
  • Right-click on the required network adapter and select Properties from the menu;
  • Select IPv4 In the Properties window, and click on the Properties button;
  • Fill in the appropriate fields with the necessary data:

Here, the machine is assigned as the preferred DNS server, and the alternate is assigned as dns.google [8.8.8.8].

Installing the DNS server role

To add new roles to Windows Server, you use Add Roles and Features Wizard in Server Manager.

On the upper navigation bar of the Server Manager click the Manage menu, and then select Add Roles and Features:

Here, the Wizard recommends you to verify if the following tasks have been completed:

1. The Administrator account has a strong password.

2. Network settings, such as static IP addresses, are configured.

3. The most current security updates from Windows Update are installed.

If you are sure that all the conditions are met, click Next;

Select the Role-based or feature-based installation and click Next:

Select a server you want from the server pool and click Next:

Check off the DNS server role and click Next:

Check the list of features to install and confirm by clicking Add Features:

Keep the list of features as is and click Next:

Read the information and click Next:

Check the installation configuration once again and confirm your decision by clicking Install:

The final confirmation screen lets you know that the installation has been successfully completed, and you can close the installation Wizard:

Creating forward and reverse lookup zones

A domain zone — a set of domain names within a specific domain.

Forward lookup zones resolve names to IP addresses.

Reverse lookup zones resolve IP addresses to names.

You have to use the DNS Manager to create and manage the zones.

On the upper navigation bar of the Server Manager click the Tools menu and select DNS in the drop-down list:

Creating a forward lookup zone

  • Right-click on the Forward Lookup Zones folder, select New Zone. This will open the New Zone Wizard:

  • On the Welcome screen of the Wizard, click Next:

  • On the Zone Type screen, Select Primary Zone, and click Next:

  • Enter the name, and click Next:

  • If necessary, change the name of the future zone file and click Next:

  • You must choose whether you want to allow dynamic updates or not. It is not recommended to allow this because of a significant vulnerability. Click Next:

  • Verify that the selected settings are correct, click Finish:

Creating a reverse lookup zone

  • Open the DNS Manager and right-click on the Reverse Lookup Zones folder, select New Zone. This will open the New Zone Wizard:

  • On the Zone Type screen, Select Primary Zone, and click Next:

  • In the first Reverse Lookup Zone Name page, select IPv4, click Next:

  • Type the network ID (the first three octets of the IP address) and click Next:

  • If necessary, change the name of the future zone file and click Next:

  • You must choose whether you want to allow dynamic updates or not. It is not recommended to allow this because of a significant vulnerability. Click Next:

  • Verify that the selected settings are correct, click Finish:

Creating a host (A) record

This section of the guideline is here to mostly check all the steps you performed earlier.

A Resource Record is the unit of information storage and transmission in DNS. RRs are the basic building blocks of host-name and IP information and are used to resolve all DNS queries.

Record A — a record that lets you map hostnames to an IP address of the host.

Record PTR — is the reverse version of an A Record.

  • Open the Forward Lookup Zones folder in the DNS Manager and find the zone folder. Right-click on the right part of the DNS Manager and select New Host (a or AAA):

  • New Host page opens. In Name, type a name of the host (with no domain, it will use the name of the Zone as a domain) and your IP address. Check off the section «Create associated pointer (PTR) record», to verify if both Forward and Reverse Lookup Zones are operating properly:

If the Name field is blank it uses parent domain name.

  • You can also add records for other servers:

  • Once you are finished, click Done.

Making sure everything is correct

  • Check the changes in the folders of the zones (in the example below you can see 2 records appeared in each of them):

  • Open the command line (cmd) or PowerShell and run the nslookup command:

It shows that the default DNS server is example-2012.com with the address 10.0.1.6.

To make sure that the Forward and Reverse Zones are operating properly, you can send two queries:

  • To query the domain;
  • To query the IP address:

In the example, we have got appropriate responses for both queries.

  • There is an option to send a query to an external resource:

We see a new line here «Non-authoritative answer». This means that our DNS server does not contain domain’s original zone files. Although the information displayed below, received from an authoritative server, it is not itself authoritative in this case.

To compare, all the same queries were made on the server where the forward and reverse zones were not configured:

Here, the machine assigned itself as a default DNS server. The DNS server domain name is displayed as unknown because there are no resource records for the IP address (10.0.1.7). For the same reason, the 2nd query returns an error (Non-existent domain).

See also

Have questions before you deploy? Contact our Customer Success team to get answers.
We use cookies to provide our services and for analytics and marketing. To find out more about our use of cookies, please see our Privacy Policy. By continuing to browse our website, you agree to our use of cookies.