Graphic Motion Video Art, Website, IT Network, Culture

Building Local Dns Server Using BIND for Windows to the local Network.

DNS Server is the database server which will be distributed and mapping the hostnames to the IP address and otherwise. This is the process which must be passed when we are connected to the internet to access any servers in the world. So when we use the specific dns server such google dns, we will follow the domain database rules on this server. For example if google dns has blocked any webhosting server, we will not be able to access the webhosting server using this dns server. I personally prefer to use google dns because the resolve dns response more quickly and widely, but this would depend on your purposes.

From ISP (Internet Service Provider) itself many has been implemented the Internal DNS Server to their clients internet services for some reasons . This will greatly depend on the quality and ability of their internal dns sever to serve their clients. If sometime their dns server having a problems, automatically their services will be disrupted, although their internet connection in good condition. This could be a factor that could be a problem and the resolve dns response of their dns server to serve many clients.
In some other cases building local dns server will be the alternative way which can increase the internet speed and can be fix the problem dns server to our local internet network. When we have used local dns server, we can make our rules for the local dns server, and all the responsibility is fully on our hands to manage the rules of local dns server. Ok we begin immediately how to build local dns server for our local network using BIND (Berkeley Internet Name Domain) on windows. BIND is the open source or free software that allow you to build your local DNS Server.

1. Download and Install Bind on windows for Local Dns Server

BIND (Berkeley Internet Name Domain) is free software that allow us to build dns server that can be run for some operating system. In this case, we will implement Bind on window 7 32bit. You can download Bind application version by visiting or just download this file here.
After you have download you can extract the zip file at first and you can run BINDInstall.exe. Then you can fill where the installation files will be placed.
Target Directory : c:\windows\system32\dns
Service Account Password : named
Password : Up to you!

For more details you can see the picture below! After you fill the installation configuration, you can click install!

If something happen during installation such a Problem from "vcredist.msi "file.  You can find vcredist_x86.exe  from the source BIND installation files, and you can extract this exe file and you can see vcredist.msi to the extracted files. Then you can browse the asking file and the installation process will be continued. Until you have found successful Bind Installation, you can close Bind Installer.

2. Configuration of the Variables Path to the Bind Installation Root

Make sure the variables Path of Environment Variables in system properties has added the string. Look at the two pictures below!
Windows 64 bits ;%SYSTEMROOT%\SysWOW64\dns\bin;
Windows 32 bits ;%SYSTEMROOT%\system32\dns\bin;
And the complete variables path that have been added string will be like this

3. Bind Installation files and Adding a New Folders

Go to the Bind Installation Path c:\windows\system32\dns. And you will see Bind Installation has 2 main folders/directories, that is bin and etc folders. Run the command prompt, by typing cmd on start menu, right click, and run as administrator

We are going to create log and zone folder on Bin installation files using command prompt (CMD).  After cmd has running and type the command below!
mkdir log
mkdir zone

4. Create the configuration files in Bind Files and Drivers\etc

To make the local dns server we have to create some configuration dns files as the local Dns Server.  The configuration files require further understanding in DNS programming to build dns server as the specific characters and rules of your dns server as you like. You can learn more about DNS programming But now I will give the configuration as the basic local dns server that you can customize as dns server and rules.

Create named.conf in System32\dns\ etc

Proceed from the active root from the command prompt before. Still at the active root/path on cmd. Next we will continue of the next command to create the bind configuration files, just continue type :

cd etc
notepad named.conf

named.conf :
options {
    directory "C:\Windows\System32\dns\zone";
    allow-query { localhost; clients ; };
    forwarders {;;;; };
    forward only;
    max-cache-size 2097152 ; 
    empty-zones-enable yes;

acl  clients    {  ;  ;

zone "" { type master; file "dummy-block"; };
zone "" { type master; file "dummy-block"; };
zone "" { type master; file "dummy-block"; };
zone "" { type master; file "dummy-block"; };
zone "" { type master; file "dummy-block"; };
zone "" { type master; file "dummy-block"; };

logging {
    channel queries_log {
        file "C:\Windows\System32\dns\log\queries.log";
        print-severity yes;
        print-time yes;
    category queries { queries_log ; };

zone "localhost." IN {
    type master;
    file "";
    allow-update { none; };
zone "" IN {
    type master;
    file "localhost.rev";
    allow-update { none; };

include "C:\Windows\System32\dns\etc\rndc.key"; 

This named configuration using forwarders as parent dns server by google dns, you can change or add another dns server as forwarders. The acceleration access for the local network, you can adjust the IP network as your own. If you want to block the access hostname/url, you can fill the hostname on zone with dummy block. And make sure queries.log and rndc.key in the right path that we will created next.

Create and localhost.rev in System32\dns\etc

cd zone
notepad localhost.rev :
$TTL    86400
@               IN SOA  @       root (
                                        42              ; serial
                                        3H              ; refresh
                                        15M             ; retry
                                        1W              ; expiry
                                        1D )            ; minimum
                IN NS           @
                IN A  
                IN AAAA         ::1 

localhost.rev :
$TTL    86400
@       IN      SOA     localhost. root.localhost.  (
                                      1997022700 ; Serial
                                      28800      ; Refresh
                                      14400      ; Retry
                                      3600000    ; Expire
                                      86400 )    ; Minimum
        IN      NS      localhost.
1       IN      PTR     localhost. 

Create queries.log in System32\dns\log

cd log
notepad queries.log

we just create queries.log file that the path file is related to named queries.log  configuration, leave it blank! this file will be the place as the record of the log dns access.

Create rndc.key in System32\dns\etc

cd bin
rndc-confgen –a

The rndc.key (remote name daemon control) that program file that allow us as the system administrator to control the operation of a name server, this will created automatically in dns\etc by the above command.

Create resolve.conf in System32\drivers\etc

The resolve.conf  consist with the IP nameservers as the IP address of dns server itself. If you want to access the local dns server on the unit server where the local dns installed you can access as the localhost IP. But from the client network it can be accessed by as the localnetwork IP address that connected with.
cd drivers
cd etc
notepad resolv.conf

resolv.conf :

5. Run Local Bind Dns Server on Windows Services

After we have created the all configuration of the local Bind Dns Server, to use Bind Dns server we have to run the service on windows system. Ok we can run the service by typing services.msc on the windows start menu and click services, and you try to start ISC BIND on services, perhaps you will find the error warning to run ISC BIND services like the picture below!

Ok we have to fix this problem by right click on ISC BIND and click properties. On ISC BIND properties you click on the tab “Log On” and select Local System account as shown like the picture below! And you can try again to start ISC BIND Services.

6. Setup Network Configuration to Use Bind Dns Server

Assuming that local Bind Dns Server have installed on Wan server which directly connected to ISP internet connection. In this case I use dial-up connection, actually this kind ISP can not allow you change the dns server by external dns server such google dns (, if you do like this you will lost the internet connection. But now I have local Bind Dns Server to this unit wan server and I'll use local dns server with the IP server that has forwarders to google dns. And now I do not depend anymore to the ISP dns server.
In the purpose to use local Bind Dns Server to the local network that using mikrotik router, we have to setup dns server leading to the IP address of  the unit where the dns server is built or installed and connected with. It doesn’t means that local dns server must be installed as wan server. Local Dns Server also can be installed as the client network. Ok open your mikrotik winbox, click IP > DNS and you can insert the IP local dns server. In this case, it also as the IP wan server on my network. 

7. Testing and Resetting Local Bind Dns Server

To start using Local Bind Dns Server we should clear Windows DNS Cache. You can reopen again cmd and type.
ipconfig /flushdns  : clear all Dns Cache Server
rndc reload : reload bind Dns Server
dig : interrogate server

The Query time dig at 2  time and more should be smaller then when you dig at first time, because at 2 times and later will reload the dns cache server. 

To inspect the DNS Cache Server type : ipconfig /displaydns. The last command line will enable the query.log  record when restart ISC Bind Service : rndc querylog. That’all about building local dns server network using Bind using windows, have a try and good luck!

Share This Article :
Related Articles


  1. mu dear and sweet admin
    i have tryed many time to instal end run Bind but at the end of time i have got this error

    windows couldnot start the ISC BIND service on local computer
    Error 1067: the process terminated unexpectedly.

    do you have any slation to fix this error????

    1. I think any conflict with another software, try to check the event logs! :)

    2. ok sir thanks

      i will try to resolving the problam :)

    3. ISC BIND starting error 1067

      online help ans is here

      404 - File or directory not found.
      The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

    4. The rndc.key (remote name daemon control) that program file that allow us as the system administrator to control the operation of a name server, this will created automatically in dns\etc by the above command.

      rndc.key is not created automatically in dns\etc folder this is the issu dear admin any other command ????

    5. its because of permission issue. give full control to installation folder to the user

    6. its because of permission issue. give full control to installation folder to the user

  2. I am sorry... I really don't know what actually the problem that you have found. I just can suggest you, to give attention every time you insert the command prompt, where is the path directories where currently you're active.

  3. When you're tired, you want to relax after a stressful working hours, you need to have time to take care of the kids active.
    Please visit our website and play exciting flash games.
    Thanks you for sharing!
    Friv 4


  4. This information is impressive; I am inspired with your post writing style & how continuously you describe this topic. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic.

    Digital Marketing Company in Chennai

    Digital Marketing Services in Chennai

  5. Thanks for the information. Helped us to convince most on how this process works and what they could achieve by following these guidelines

    Bangalore Web Designing Company, Web Development Company

  6. That is very interesting; you are a very skilled blogger. I have shared your website in my social networks..!

    Payday loans in Alabama
    Title loans in South Carolina

  7. thank the good is great
    Welcome To Casino online Please Click the website
    thank you.
    gclub online

  8. thanks for your share this good informations,click here if you want to play with casino online all game thank you.

    goldenslot casino
    gclub casino

  9. BlueHost is one of the best hosting company for any hosting plans you might need.

  10. This blog is awesome and very informative keep Sharing this type of blog.



  11. Please keep updating this blog, it's been too long. Great post! We adore this blog and This information is very good.




Back to Top