Thursday, April 17, 2008

DNS Disaster Recovery!


 

If you are working in an organization that hosts its own DNS server where you have the records for MX, Web and other servers that are accessible externally, you must put a plan for how to rebuild your DNS server in case of failure or a disaster.


 

In this article, I am going to show you how to backup the zones in your DNS server and restore those using DNSCMD command lines; DNSCMD is a part of Support tools. So you must install the support tools in order to run this command.

I am going to simulate the case, by backing up a production DNS server and restore it to a virtual machine image. After installing the support tools on the server go to:

Start -> programs -> windows support tools -> command prompt

The syntax for our command is: dnscmd [ServerName] /zoneexport ZoneName ZoneExportFile

So based on my server and zone names, I will use the following syntax:

C:\>dnscmd MyDNSname /zoneexport TestZone.com TestZone.com.bak

You will notice that the output of this command is:

DNS Server MyDNSname exported zone

TestZone.com to file %windir%\system32\dns\ TestZone.com.bak

DNS server Command completed successfully.

Now you have to browse to the specified path and copy the .bak file, which we will use it to restore the zone to a different server.

  • On the new server which supposes to be as a new one, install the DNS service and don't create any new zone.
  • Paste the .bak file on %systemroot%\system32\dns and rename the extension to .dns
  • Go to DNS management console, right click forward lookup zone and choose new zone, Next, Next, give it the same name, then next, make sure to choose the second choice, it should take the name of the zone automatically.



     

Now check your zone, it should contain your old records.

Note: In my case, the DNS server is a member server setting on the DMZ zone so the option to have active directory integrated zone is not available. One more thing, the previous exercise is valid in case of corrupted zone or you need to do some modifications on a specific zone, this will get your zone back before the changes.

For more information: http://technet2.microsoft.com/WindowsServer/en/library/d652a163-279f-4047-b3e0-0c468a4d69f31033.mspx?mfr=true


 

Monday, April 14, 2008

Creating a custom address list



In the previous article we imported a group of contacts from different companies into our AD, the good thing is that those contacts are categorized into OUs based on different company name. I believe we can create a custom address list based on the company names. but first of all we have to change the company name for each contact !

Actually, this is an easy process with ADModify. Just download the tool and extract it. Note: you will need .Net frame work in order to work.



Once you run the tool, click on Modify Attribute, and then you will get this screen:










In the Domain List, choose your domain. In the Domain controller List, choose any available DC.



Then click on contacts only, to filter your search. Now click on the green arrow, after that browse to the required OU, once you find it, just click it and click Add to List->, then Select All, and click Next, go to the Organization tab, now we can change the company property for the selected group of contacts in one shot, just check mark company and write the company name, then click Go.


Now let's go to Exchange Management Console to create the customized address list.



Open your EMC, browse to Organization Configuration->Mailbox, right click Mailbox and choose New Address List, give it a name and click the following specific types, then check mark contacts with external e-mail addresses and click next. In the next screen check mark recipient is in a company in Step 1 and click specified in step 2 to fill the company name. To make sure you are filtering the right contacts click preview. Now click next and Next to create the address list immediately.

Now your customized address list has been created and should be accessible to your outlook clients either through MS outlook or OWA.



Enjoy it!