Aug19

Written by:David Aldridge
8/19/2010 12:54 PM 

Windows Web Server 2008 is far better than the previous version in that it does not restrict what applications you can install on it.  This is a quantum leap ahead of Windows Web Server 2003, and actually makes it usable.

However one glaring omission from Microsoft was the inability to add the DNS role.  This leaves you having to add a third party solution if you want to run your own DNS service on a Windows Web Server 2008.

The free answer is to install BIND.  This needs some configuration work, but in general it works well.

First you have to download the BIND installer from ISC:

http://www.isc.org/dowloads

And download the latest version of BIND for Windows.  This is a zip file, so extract the contents of it to a temporary install folder.  Once extracted, run BINDInstall.exe.

Set the Target directory to something other than the default C:\windows\system32\dns - windows will in general stop you putting files there - change it to C:\BIND or similar.

Leave the service account name as 'named' and set a password for it.  The installer will take care of creating a low priviledge account for running the DNS service.

Make sure 'automatic startup', 'keep config files after uninstall' and 'Start BIND service after install' are checked and click Install.

Once install completes, click Exit.

Now to create a configuration, open up a command prompt and change directory to the bin directory under where you just installed BIND and type:

rndc-confgen -a

mkdir ../etc/run
mkdir ../etc/zones
mkdir ../etc/log
touch ../etc/log/named.log


This will create the basic configuration and three empty directories for the zones, logs and process id files.

Now type the following into notepad to create the basic named.conf configuration file:

options {
    directory "c:\BIND\etc";
    version "not currently available";
    pid-file "run\named.pid";
    allow-transfer { none; };
    allow-query { any; };
    recursion no;
};

logging{
    channel my_log{
        file "log\named.log" versions 3 size 250k;
        severity info;
    };
    category default{
            my_log;
    };
};

zone "example.com" IN {
    type master;
    file "zones\db.example.com.txt";
    allow-transfer { none; };
};

controls {
     inet 127.0.0.1 port 953
         allow { 127.0.0.1; } keys { "rndc-key"; };
};


In the options section be sure to set the directory to the directory where you installed BIND.  Save this file as named-basic.conf in the etc directory.

Going back to the command prompt, type the following:

cd ../etc

copy named-basic.conf + rndc.key named.conf


This provides you with the basic configuration file.  Now to create a simple zone file.

Type the following into notepad and save it into zones/db.example.com.txt:

$TTL 6h
@    IN SOA    ns1.example.com. hostmaster.example.com. (
            2010081001
            10800
            3600
            604800
            86400 )

@        NS    ns1.example.com.
@        NS    ns2.example.com.


ns1    IN A    192.168.1.100
ns2    IN A    192.168.2.100

@    IN A    192.168.1.1
mail    IN A    192.168.1.2

www    IN CNAME    @

@    IN MX 10    mail


Now save this and you have a working DNS setup.  You can add zones by editing the configration files.

 

Tags:

Your name:
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Security Code
Enter the code shown above in the box below
Add Comment  Cancel 
You must be logged in and have permission to create or edit a blog.