Install & Configure Windows DNS Service
Wednesday, March 11th, 2009 | Author:

Steps to Configure Windows DNS Server/Service.

Here is a very simple way to configure a DNS service on Windows Dedicated Server that hosts your website.

Requirements:

1. You should have one of the following Windows OS to install the DNS service:

— Windows XP Professional edition.
— Windows Vista.
— Windows 2003 Server Data center edition.
— Windows 2003 Server Enterprise edition.
— Windows 2003 Server Standard edition.

You cannot install DNS service on Windows 2008 Server with the steps below as it does not have an option to add remove Windows Components. You will have to use the Server Manager option to install Services on your Windows 2008 Server.

I have not specified Windows NT and Windows 2000 version as they are hardly used now a days. Also Windows XP Home edition and Windows 2003 Server Web edition does not support DNS service on them.

2. Windows OS installation CD or the i386 folder.

3. A user that will have Administrator rights on the Dedicated server on which you want to install DNS service.

Installation Steps:

1. Go to Control panel >> Add/Remove Programs >> Add/Remove Windows Components, it will open a windows below:

install-dns-service-step-1

2. Click Next and you will get the screen,  see below:

3. Select the Networking Server (DO NOT CHECK THE BOX) and Click on Details (Highlighted in red) and you will get screen below:

4. Check Box on Domain Name System (DNS) and Click OK >> then Next. It will start the installation and will popup for the CD:

5. Browse to the i386 folder and then Click OK to complete the installation of DNS Service.

DNS Service and ZONE Configuration:

1. G oto Start >> Run and type the command below and hit enter:

dnsmgmt.msc

2. This will open DNS Management Console:

3. Before making any changes on the DNS server I will show you some steps that will make your life as well as the configuration very easy.
A. We will assume that we have to crate a DNS zone for the domain www.moosa.com. For that just go to C:WINDOWSsystem32dns directory (Path to WINDOWS may differ as per the OS you use, you can find it with %windir% or %SystemRoot% in the explorer)
B. Create an empty file as moosa.com.dns.
C. Insert the entire code into it:
——–

;
; Database file moosa.com.dns for moosa.com zone.
; Zone version: 1
;

@ IN SOA NS1.moosa.com. info.moosa.com. (
1 ; serial number
900 ; refresh
600 ; retry
86400 ; expire
3600 ) ; default TTL

;
; Zone NS records
;

@ IN NS NS1.moosa.com.
@ IN NS NS2.moosa.com.

;
; Zone records
;

@ IN A 192.168.5.52
mail IN A 192.168.5.72
www IN CNAME moosa.com.
ftp IN CNAME moosa.com.

;
; Zone Mail records
;

@ IN MX 10 mail.moosa.com.

——-
Let me explain each entry one by one briefly, you will have to change each of them as per your requirement:

– NS1.moosa.com. in SOA : This is the primary name server of my domain moosa.com. It is not compulsory that you too may have name server on your domain. But it should be the one from the set of name servers that you provide to your registrar to point your domain on your server.

– info.moosa.com. in SOA: This is actually an email address info @ moosa.com, it is provided for the DNS server to send notification of that is a problem within the zone.

— You can forget the rest in SOA as it will require a separate topic to explain those.

– NS1.moosa.com. in NS: This is again a primary name server that was provided to registrar.

– NS2.moosa.com. in NS: This a secondary name server of my domain moosa.com.
It is not over here, you can even have 3rd and 4th NS entry here. A zone will accept up to 13 NS entries for a single domain.

– ‘A’ records: ‘A’ record has the IP address that you want your domain to point at. This will probably the IP address of your web server or a mail server. I have 2 A records for moosa.com and mail.moosa.com, one for the IIS web server and other for the Exchange mail server.

– CNAME: CNAME are the canonical names for a domain or duplicate names. I have 2 CNAME so that www.moosa.com and ftp.moosa.com will point to the same IP of moosa.com.

– MX record: MX record will be required for your mails to work. It shows a path to your email server. If you do not have an email server and this record will not be required.

I will not go more deep in each of these settings or this topic will turn into a book. :)

4. Save the file and close it, make sure that each setting looks exactly the same as that has been defined above or the zone creation will fail.

5. Now go back to DNS Management Console, right click on SERVER NAME to make sure that the DNS service is running. If it is not running then click on Start option to start the service.

6. Right Click on “Forward Lookup Zone” >> New Zone:

7. It will Open the New Zone Wizard, click Next on first screen and then select “Primary zone” and then Next:

8. Put Domain name in “Zone Name” screen, without www in it. and click Next:

9. In the Zone File screen, Select the 2nd option “Use this existing file”. Make sure that the file name and path matches your name and path from the steps above. Then click Next:

10. In “Dynamic Update” screen, select “Do not allow dynamic updates” and click Next:

11. Click Finish on Next screen to create the new domain for your domain:

12. Your zone will appear in the screen below. You wil either double click the existing entries to update/edit/modify them or right click on the white screen to Add new Records as per your need.

DO NOT FORGET TO EITHER RELOAD THE ZONE OR RESTART THE DNS SERVICE FOR THE CHANGES YOU HAVE MADE TO REFLECT.

That is it.. now create another zone and so on..

Wasn’t that damn easy..!!!