Linux DNS Server

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], ns1.domainname.com., hostmaster.
(same as parent folder)     Name Server (NS)             ns1.domainname.com.
(same as parent folder)     Name Server (NS)             ns2.domainname.com.
(Same as parent folder)     Host (A)                            123.123.123.123
www                                 Host (A)                             123.123.123.123
subdomain                          Host (A)                             213.213.213.213

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

Cheers,

Phil.
phil8258Asked:
Who is Participating?
 
kakchiquelCommented:
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 "domain.com" IN {
      type slave;
      allow-query { any; };
      file "slaves/domain.com.zone";                  (i personally have a /slave file for all zones)
      masters { X.X.X.X; };                                  (X.X>X.X is your windows current master)
0
 
phil8258Author Commented:
Hi,

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.

Cheers,

Phil.
0
 
kakchiquelCommented:
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.
0
 
phil8258Author Commented:
Hi,
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 my-new-domain-name.org.uk is the domain and 192.168.2.4 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?

Cheers,

Phil.






//
// 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 { 127.0.0.1; };
        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 { 158.43.240.4; 158.43.240.3; 192.168.2.1; };
};
logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
view localhost_resolver {
        match-clients      { localhost; };
        match-destinations { localhost; };
        recursion yes;
        include "/etc/named.rfc1912.zones";
};
 
zone "." IN {
        type hint;
        file "named.ca";
};
 
zone "my-new-domain-name.org.uk" IN {
        type slave;
        file "slaves/my-new-domain-name.org.uk.zone";
        allow-update { none; };
        allow-query { any; }; 
        masters { 192.168.2.4; };
};

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.