Feb 15, 2013

Set up DNS on Windows Server 2008 (R2)

If you’re like me and run your websites on Windows Server 2008, you might have had the need to set up your own DNS services and use your own nameservers on it. If you’re not a big networking person (like me), this can prove to be a little confusing to do yourself. Let’s jump right into this and get started.

If you haven’t already you’ll need to add the DNS Server role to your server before you can continue with the next steps. Installing a new role is fairly straightforward, if you need help check out this article.

Create a New Forward Lookup Zone

Once the role is installed and you’re in the server manager, drill down the treeview in the server manager by expanding Roles → DNS Server → [machine name] → Forward Lookup Zones. Right click Forward Lookup Zones and select New Zone…

 The new zone wizard should open up, click the Next button. We’re going to be creating a Primary Zone, so select the radio button and hit Next.

 Next it will ask you for a zone name, this will be the domain name you are setting up so for example, domain.com. Click the next button once you’ve entered your domain.
Next the wizard will ask you if you want to create a new zone file or use an existing. Leave everything as default and click next.

 On the next screen it’ll ask you whether you want to allow dynamic updates. You can leave the default Do not allow dynamic updates selected and click next.

Finally, click the Finish button.


Add the Nameserver Entries

Right click the zone we just added in the server manager treeview and select Properites. Select the Name Servers tab. There should already be a default entry for the nameservers, you can remove this by selecting it and clicking the Remove button. Next, click the Add button. In the New Name Server Record window, enter the full qualified domain name in the space provided, so for example, ns1.domain.com. Next click where it says <Click here to add an IP Address> and enter the first IP address you’ll be using. Click the OK button to add the first entry.



 Repeat this step for the second IP address you should have, but use something like ns2.domain.com for this one. When finished, you should have something that looks like this:

Click the OK button.

Add a Host Record

Next we’ll create a host record for our zone. Right click the zone and select New Host (A or AAAA). You can leave the name field blank as this will use the name of the zone (domain.com). Enter the ip address this domain will be using and click the OK button.

Add a WWWAlias

Chances are you’ll probably want people to be able to connect to your domain by typing www.domain.com and not just domain.com. We can add an alias for www. To do this, right click your zone and select New Alias (CNAME). For the Alias name, enter www. For the fully qualified domain name, type domain.com and click the OK button.

You would also add subdomains this way, so if we wanted sub.domain.com we would set it up the same way as above, replacing the alias name with sub.

The Final Product

When all is said and done, you should have something similar to this:





 Hopefully this helped you with getting DNS set up. I will post later about adding MX entries and also SPF records, but that’s all for now. Enjoy!

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Computer Tricks and Tips