Installing Windows DNS Server
This tutorial will guide you through setting up Windows DNS Server and adding your first domain so that you can host your own domains name servers.
Requirements:
- Windows Server 2008/2008 R2
- 2 STATIC internet IP addresses routed to your server (1 will work but it is not recommended, however it MUST be STATIC).
- A domain that allows it’s name servers to be changed (most registrars support this).
- Port 53 unblocked on your firewall (and port forwarded on your router if applicable), both TCP and UDP (DNS service).
- A reliable internet connection is a must. If your connection goes down, so do your domains!
- Patience.
Optional:
Basic knowledge of how DNS records function is helpful but not necessary for this tutorial.
A test domain you can use without risk to your main domain (I recommend you use this one instead of your domain domain when setting up for the first time).
A test domain you can use without risk to your main domain (I recommend you use this one instead of your domain domain when setting up for the first time).
1. Install Windows DNS Server (If it hasn't been installed yet):
Navigate to Start >> Control Panel >> Administrative Tools and open Server Manager.
In the tree menu on the left, select Roles.
In the main window, find the sub-section Roles Summary (it should be at the top) and click Add Roles.
On the pop-up window, read the security warnings and then select Next.
Select DNS Server from the list of check box options.
Adding your first domain
- Navigate to Start>>Administrative Tools and open DNS, the tool for managing your DNS records.
- You’re now presented with the base (blank) DNS Server configuration.
- Your server name will be listed on the left. Select “+” to make it expand the tree.
- Select Forward Lookup Zones and then right click and select New Zone.
Adding your first domain
- On the pop up box, select Next.
- Now select Primary Zone (default) and click Next.
- In the Zone name box, enter your domain name without http:// or www.
- Select Next and on the next screen select Create a new file with this file name, then Next.
- On the next screen select Do not allow dynamic updates and select Next.
- On the final screen, click Finish.
Your domain is now created, we just need to configure it.
You will see your domain inside Forward Lookup Zones.
Select your domain and then double click on the Start of Authority (SOA) record.
In the pop up box we need to enter the following information:
Serial Number: Enter in the following format YYYYMMDDNN
(YYYY = Current year in 4 digits, MM = Current month in 2 digits, DD = Current day of the month in 2 digits, NN = Increment, so 01 to begin with)
Primary Server: ns1.testforyou.com (replace testforyou.com with your own domain name)
Responsible Person: hostmaster.testforyou.com (replace testforyou.com with your own domain name)
Setting up your domain
Select the Name Servers tab and remove the existing entry.
Aelect Add and enter ns1.testforyou.com in the top box (replace testforyou.com with your own domain name).
Where it has , click it and enter the static IP of your server and click OK. This must be the external IP, not a local network or private IP.
Repeat the last two steps but use ns2.testforyou.com and your 2nd static IP. Skip this 2nd addition if you only have 1 IP.
Finally click Apply and then OK to close the window.
We have now set up the domain.
Setting up your domain
On the main window, select where the records are in the white space then press F5 on your keyboard. This will refresh the records and 2 more should appear.
Now right click and select New Host (A or AAAA).
Leave name blank and enter the IP you will use to host websites on in IIS into the IP Address box.
Click Add Host. You should get a confirmation message. Click OK then Done.
Your domain is now set up to be accessed as “testforyou.com” (without www.)
Now do the same again but in the Name box, enter www. This sets up the domain so it can be accessed with www. in the URL.
Repeat the same again for any other records such as ftp, pop, smtp, mail, imap, etc so they can be accessed as {name}.testforyou.com.
Now, if you’re going to want mail to be delivered via your domain, you will need an MX Record.
In the DNS Manager window for your domain, Right click and select New Mail Exchanger (MX).
Leave Host or child domain blank and enter your domain name into the Fully qualified domain name box as testforyou.com
Leave the Mail server priority as 10.
Click OK and the record will be added.


No comments:
Post a Comment