Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Linux DNS Server

Posted on 2009-04-06
Medium Priority
Last Modified: 2012-05-06
I'm running a windows 2003 server and linux server on my network, and trying to move everything from the windows one to the linux one.

DNS has got me stuck - it looks hard on a linux machine!

the DNS manager in windows server 2003 has no reverse lookup zones configured, but several in the forward lookup zones.

They look like:

(same as parent folder)     Start of Authority(SOA)     [18],, hostmaster.
(same as parent folder)     Name Server (NS)   
(same as parent folder)     Name Server (NS)   
(Same as parent folder)     Host (A)                  
www                                 Host (A)                   
subdomain                          Host (A)                   

.....and I'd like to replicate this setup on the linux machine in the easiest and most robust way possible.


Question by:phil8258
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2

Accepted Solution

kakchiquel earned 1000 total points
ID: 24079844
You need to have Windows allow DNS replication to the Linux box. Right click on the zone, and go to Name Servers and add the Linux DNS IP address on there.

Now on the Linux you have to have your named.conf configured to allow the zone to be created. The following entry would go in your named.conf file (obviously suited to your dns name)

zone "" IN {
      type slave;
      allow-query { any; };
      file "slaves/";                  (i personally have a /slave file for all zones)
      masters { X.X.X.X; };                                  (X.X>X.X is your windows current master)

Author Comment

ID: 24080871

Thanks for the comment. Following your first point (add the linux DNS IP address to the zone), I don't think i've made my question completely clear... I want to get rid of the windows server currently running DNS, and move that function to the linux server.

I'll try adding to named.conf and see what happens.



Expert Comment

ID: 24081127
Ok, the tip i gave is to allow replication to Bind on the Linux machine. This would get any zones transfered to the Linux machine then you could remove DNS services from the Windows server. Once it replicates you would just change "type master;" and remove the last line unless you have any secondary DNS servers.

Author Comment

ID: 24237557
Sorry i've been a while to come back to this...

I've modified the file /etc/named.caching-nameserver.conf and it looks like the code attachment. (where is the domain and is the windows server running DNS)

From what I understand, if I point the router to forward port 53 to the new server, it will lookup from the old windows master. Therafter once it has recorded the details from the master I can change the type of this one to master and get rid of the windows dns server.

Should it just work?? So far it has not. Do I need to manually create a file in the /var/named/slaves directory - and if so, what am I supposed to put in it?
Was restarting the service with /etc/init.d/named restart sufficient?



// named.caching-nameserver.conf
// Provided by Red Hat caching-nameserver package to configure the
// ISC BIND named(8) DNS server as a caching only nameserver 
// (as a localhost DNS resolver only). 
// See /usr/share/doc/bind*/sample/ for example named configuration files.
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on 
// caching-nameserver package upgrade.
options {
        listen-on port 53 {; };
        listen-on-v6 port 53 { ::1; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        // Those options should be used carefully because they disable port
        // randomization
        // query-source    port 53;     
        // query-source-v6 port 53;
        allow-query     { localhost; };
        forward first;
        forwarders {;;; };
logging {
        channel default_debug {
                file "data/";
                severity dynamic;
view localhost_resolver {
        match-clients      { localhost; };
        match-destinations { localhost; };
        recursion yes;
        include "/etc/named.rfc1912.zones";
zone "." IN {
        type hint;
        file "";
zone "" IN {
        type slave;
        file "slaves/";
        allow-update { none; };
        allow-query { any; }; 
        masters {; };

Open in new window


Featured Post

Introducing the WatchGuard 420 Access Point

WatchGuard's newest access point includes an 802.11ac Wave 2 chipset, providing the fastest speeds for VoIP, video and music streaming, and large data file transfers. Additionally, enjoy the benefits of strong security as the 3rd radio delivers dedicated WIPS protection!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
I've written instructions for one router type, but this principle may be useful for others of the same brand and even other brands of router. Problem: I had an issue especially with mobile devices that refused to use DNS information supplied via…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question