How to Migrate DNS from Unix to Windows

How to Migrate DNS from Unix to Windows
Page content

DNS Migration Perquisites

It is a best practice to perform this migration as a transition and run both DNS servers in parallel until your new server is fully functional and you can safely remove the old server.

Before you start the actual DNS migration, you need to prepare both servers for the migration. First, on the Windows system make sure the server you are migrating to is fully patched and it has a fixed IP address. Then, depending on your network configuration you will need to tell your clients that a secondary DNS server exists and they should ask both servers when resolving DNS requests. If your clients are configured by DHCP (which is the best practice) then you will just have to add the Windows DNS server. In the DHCP server configurations please add the Windows server as secondary DNS server. Then you will need to configure the Unix BIND service to allow zone transfers to your newly installed Windows DNS Server.

On your UNIX DNS Server, find your “named.conf” file and add the IP address of the Windows Server to the servers allowed to perform zone transfers. If your server does not previously allow zone transfer, your configuration would have configuration a line like this:

allow-transfer {“none”;};

Replace this line with something like:

allow-transfer {10.0.0.5;);

Where 10.0.0.5 it’s the IP address of your new Windows DNS Server. If your BIND configuration and zone transfer option is set per zone you will need to add the “allow-transfer {10.0.0.5;);” to each individual zone that you want to migrate. Your configuration might look something like this:

zone “yourdomain.com” in{

type master;

file “master/master.yourdomain.com”;

allow-transfer {10.0.0.5;);

};

After editing the “named.conf” you will need to restart the “named” service:

/etc/init.d/named restart

Now that you have prepared the UNIX DNS server you will need to create the zones on the Windows DNS Server and start the actual migration.

Preparing the Windows DNS

Log on on your Windows 2008 DNS server and start up the DNS management console. You will need to create the DNS zone you want to migrate or if it’s the case all the DNS zones you want to have migrated from the UNIX DNS Server.

  • Right-click the Forward Lookup Zones node in your DNS console
  • From the menu, choose New Zone
  • On the Zone Type page of the New Zone Wizard, select Secondary Zone
  • On the Zone Name page write the Zone Name, exactly as it exists on the UNIX DNS Server, in our case “yourdomain.com” and press Next.
  • On the next screen you will need to specify the IP address of the master server from which you want to transfer the zone. In our case I have given the UNIX server the IP address of “10.0.0.2”. Type in the IP address of the UNIX server and press Next.
  • On the final step check your configuration and then press Finish.

If you get an error indicating that the transfer could not take place do not worry, wait a minute or two then right click the zone and then select “Transfer From Master”.

Windows 2008 DNS Server Zone Transfer

Creating a new Secondary Zone on Windows DNS

Creating a new DNS Zone on Windows DNS

Creating a new Secondary Zone on Windows 2008 DNS

Creating a new Zone on Windows DNS Server

Windows DNS Server Zone

Finishing UNIX to Windows DNS Migration

After your zone has been transferred from the Master DNS server all the existing records should appear on the right side. If you need to transfer more than one zone, please repeat the operation for each zone. It is the best practice to let both DNS servers run in parallel a few days so you can check if any problems may arise during the migration. If everything works fine it’s the time to remove the old UNIX DNS server. Before you do so, go to the DNS management console on your Windows DNS server, right click the transferred zones, select “Properties” and on the “General” tab change the zone type from “Secondary” to “Primary Zone”.

DNS Primary Zone

Go to your DHCP server configuration and remove the old UNIX DNS Server from the list of DNS servers. Now you can safely shut down your UNIX Server and continue using the Windows DNS server as your Primary DNS.