LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-10-2006, 03:42 PM   #1
neocontrol
Member
 
Registered: Jul 2005
Posts: 273

Rep: Reputation: 31
Slave dns help


Okay, where to begin. I'm coming pretty close to just going on and buying a book. Probably will anyways as this is part of my new job.

We are trying to have two dns servers. The Master works fine and does what it is supposed to do. Here is its named.conf file.
-----------------------------------------------------------
# Use with the following in named.conf, adjusting the allow list as needed:
key "rndckey" {
algorithm hmac-md5;
secret "xxxxxxxxxxxxxxxxxxxxx";
};

controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndckey"; };
};
# End of named.conf

options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
query-source address * port 53;
};
zone "." {
type hint;
file "named.ca";
};
zone "xxxxxxxxxxxxxxxx" {
type master;
file "xxxxxxxxxxxxxx.com.dns";
};
zone "xxxxxxxxxxxxxx" {
type master;
file "xxxxxxxxxxxxxx.com.dns";
};
zone "xxxxxxxxxxxxxx" {
type master;
file "xxxxxxxxxxxxxx.com.dns";
};
#zone "xxxxxxxxxxxxxx." {
# type master;
# file "xxxxxxxxxxxxxx.com.dns";
#};
#zone "xxxxxxxxxxxxxx." {
# type master;
# file "xxxxxxxxxxxxxx.com.dns";
#};
zone "xxxxxxxxxxxxxx" {
type master;
file "xxxxxxxxxxxxxx.com.dns";
};
zone "xxxxxxxxxxxxxx" {
type master;
file "xxxxxxxxxxxxxx.com.dns";
};
logging {
category lame-servers { null; };
};


55,0-1 Bot
---------------------------------------------------------
I didn't set that one up, it was here before I started.

We are trying to set up anohter server to act as slave and to replicate the data on its own. Below is its named.conf file.
---------------------------------------------------------
# Use with the following in named.conf, adjusting the allow list as needed:
key "rndckey" {
algorithm hmac-md5;
secret "xxxxxxxxxxxxxxxxx";
};

controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndckey"; };
};
# End of named.conf

options {
directory "/var/named/";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
query-source address * port 53;

};
zone "." {
type hint;
file "named.ca";

};
zone "xxxxxxxxxxxxxx.com" {
type slave;
file "/var/named/chroot/var/named/slaves/xxxxxxxxxxxxxx.com.dns";
masters {66.77.99.5;};

};
zone "xxxxxxxxxxxxxx.com" {
type slave;
file "/var/named/chroot/var/named/slaves/xxxxxxxxxxxxxx.com.dns";
masters {66.77.99.5;};

};
zone "xxxxxxxxxxxxxx.com" {
type slave;
file "/var/named/chroot/var/named/slaves/xxxxxxxxxxxxxx.com.dns";
masters {66.77.99.5;};

};
zone "xxxxxxxxxxxxxx" {
type slave;
file "/var/named/chroot/var/named/slaves/xxxxxxxxxxxxxx.arpa.dns";
};
zone "xxxxxxxxxxxxxx {
type slave;
file "/var/named/chroot/var/named/slaves/xxxxxxxxxxxxxx";
masters {xxxxxxxxxxxxxx};

};

----------------------------------------------------------
i go to check to see if the files were replicated, there's nothing there. i check the /var/log/messages file/ and i get messges saying file cant be found. ill post that soon. i just want to take out my company's information first. any ideas why this isnt working properly? btw, named is chrooted
 
Old 05-11-2006, 08:26 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You need
Code:
allow-transfer {xx.xx.xx.xx;};
in your primary's named.conf, where xx.xx.xx.xx is the IP of the slave dns
 
Old 05-12-2006, 08:29 AM   #3
neocontrol
Member
 
Registered: Jul 2005
Posts: 273

Original Poster
Rep: Reputation: 31
do i just need to add that line under options? or i think i saw something like that thru my reading they had it for everyzone.
 
Old 05-12-2006, 09:04 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
If you put it in options it's valid for all domains (globally). If you put it in a zone definition then it's valid only for that zone.
 
Old 05-12-2006, 09:06 AM   #5
neocontrol
Member
 
Registered: Jul 2005
Posts: 273

Original Poster
Rep: Reputation: 31
thanks, it works now.
 
Old 05-12-2006, 06:52 PM   #6
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
Just an FYI: If the named process is started in a chroot environment (-t /var/named/chroot), then there is no need to specify the full path for the slave files.

Since you already have the directory specified in the options section (directory /var/named), then all slave file locations can be specifed relative to the <chroot>/<directory> base. i.e.
relative to: /var/named/chroot/var/named

Code:
Master DNS Server named.conf
        // Load the external view mydomain.com zone
        zone "mydomain.com" in {
                type master;                    // Zone is a master
                notify yes;                     // Send notifies?
                allow-query { any; };           // Allow anyone to query zone
                file "data/db.mydomain";        // Load zone file
        };

Slave DNS Server named.conf
        // Load the external view mydomain.com zone
        zone "mydomain.com" in {
                type slave;                     // Zone is a slave
                masters { 206.124.x.x; };       // IP of master zone server
                allow-query { any; };           // Allow anyone to query zone
                file "slaves/db.mydomain";      // Store slave zone file as...
        };
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Slave DNS Error lindatan83 Linux - Networking 1 09-01-2006 09:02 PM
DNS SLAVE problem cccc Linux - General 0 11-29-2005 05:08 PM
Slave Dns Question kemplej Linux - Networking 5 12-23-2004 01:58 PM
Slave DNS server guntanis Linux - Networking 4 12-10-2003 09:02 AM
slave DNS problems granny Linux - Networking 17 12-27-2002 08:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration