Installing BIND DNS Server on Windows

This guide assumes :
your network is 192.168.1.0/255.255.255.0
your bind dns domain will be my.localdomain
your PC hosting bind is called my-compaq
your PC hosting bind has ip addresss 192.168.1.101

Download Bind v9.4.1 for Windows from :
ftp://ftp.isc.org/isc/bind9/9.4.1/BIND9.4.1.zip

Unzip BIND9.4.1.zip to :
c:\bind\

Run the BIND Installer
c:\bind\BINDInstall.exe
* set the target directory to C:\WINDOWS
* set the service account name to named
* set the service account password to named
* Automatic Startup
(tick)
* Keep config files after uninstall (tick)
* Start BIND Service after install (untick)
If you get asked to choose a different account name, click No and the installation will continue.

Install named.root
Download ftp://rs.internic.net/domain/named.root
save as C:\WINDOWS\system32\dns\etc\root.hints

Generate the RND key for BIND
copy all of the text below
then run it from a Command Prompt:

if exist "%systemroot%\system32\dns\etc\rndc.key"  del "%systemroot%\system32\dns\etc\rndc.key"

"%systemroot%\system32\dns\bin\rndc-confgen" -a -c "%systemroot%\system32\dns\etc\rndc.key"


Create the named.conf file …

copy and paste the purple text below, and save it to
C:\WINDOWS\system32\dns\etc\named.conf

options {
directory "C:\WINDOWS\system32\dns\etc";
pid-file "C:\WINDOWS\system32\dns\etc\named.pid";
statistics-file "C:\WINDOWS\system32\dns\etc\named.stats";
};

zone "." {
type hint;
file "root.hints";
};

zone "0.0.127.in-addr.arpa" {
type master;
file "127.0.0.zone";
};

zone "1.168.192.in-addr.arpa" {
type master;
file "192.168.1.zone";
};

zone "my.localdomain" {
notify no;
type master;
file "my.localdomain.zone";
};

// Bind 9 now logs by default through syslog (except debug).
// These are the default logging rules.

logging {
category default { default_syslog; default_debug; };
category unmatched { null; };

channel default_syslog {
syslog daemon;                      // send to syslog's daemon
// facility
severity info;                      // only send priority info
// and higher
};

channel default_debug {
file "named.run";                   // write to named.run in
// the working directory
// Note: stderr is used instead
// of "named.run"
// if the server is started
// with the '-f' option.
severity dynamic;                   // log at the server's
// current debug level
};

channel default_stderr {
stderr;                             // writes to stderr
severity info;                      // only send priority info
// and higher
};

channel null {
null;                                // toss anything sent to
// this channel
};
};


Create the 192.168.1.zone file …

copy and paste the purple text below, and save it to
C:\WINDOWS\system32\dns\etc\192.168.1.zone

$TTL 1H
@      IN      SOA      my-compaq.my.localdomain. hostmaster.my.localdomain. (
       1       ; Serial
       8H      ; Refresh
       2H      ; Retry
       4W      ; Expire
       1H)     ; Minimum TTL

NS      my-compaq.my.localdomain.
101     PTR     localhost.

Create the 127.0.0.zone file …
copy and paste the purple text below, and save it to
C:\WINDOWS\system32\dns\etc\127.0.0.zone

$TTL 1H
@      IN      SOA      my-compaq.my.localdomain. hostmaster.my.localdomain. (
       1       ; Serial
       8H      ; Refresh
       2H      ; Retry
       4W      ; Expire
       1H)     ; Minimum TTL

NS      my-compaq.my.localdomain.
1       PTR     localhost.

Create the my.localdomain.zone file …
copy and paste the purple text below, and save it to
C:\WINDOWS\system32\dns\etc\my.localdomain.zone

$TTL 1H
@      IN      SOA      my-compaq.my.localdomain. hostmaster.my.localdomain. (
           1      ; Serial
          8H      ; Refresh
          2H      ; Retry
          4W      ; Expire
          1H)     ; Minimum TTL
                       
          NS      my-compaq.my.localdomain.

          MX  10  mail.my.local.domain.
                
my-compaq      A       192.168.1.101

ns        CNAME    my-compaq.my.localdomain.
ftp       CNAME    my-compaq.my.localdomain.
www       CNAME    my-compaq.my.localdomain.
mail      CNAME    my-compaq.my.localdomain.

Configure the BIND Service
Control Panel > Administrative Tools > Services
right click on ISC Bind
click the Logon tab
click the Local System Account
click OK

Start the BIND Service
ISC Bind ( right click, click Start )

Finally configure your PC to use the BIND DNS Server
Control Panel > Network Connections
click your network card
click Properties
click Internet Protocol (TCP/IP)
click Properties
…. change the default DNS Server to 192.168.1.101
dns 1
Click Advanced
click the DNS tab
… change the DNS suffix for this connection to my.localdomain
dns 2
press OK to close all the Network Connections dialog boxes

Now in the taskbar, right click on your Network Card and click Repair.

Now you can ping ns.my.localdomain which means it works.
If you can’t, reboot your PC and retry — else check the notes.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Anti-Spam by WP-SpamShield