Solved

Dns Servers

Posted on 2002-05-14
12
190 Views
Last Modified: 2010-03-18
Hi,

Whats the best way to setup a pair of dns servers (1 Primary & 1 Secondary). I will require the secondary dns server to handle requests only if the primary dns server is overloaded or down.

Do I just set them both up the same, with identical named records, but set resolv.conf on the secondary server to have the primary dns server listed first, and then have itself listed second?

Cheers
0
Comment
Question by:choccarlm
  • 3
  • 2
  • 2
  • +4
12 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 100 total points
ID: 7008502
The preferred solution is to make one DNS server the master and to make the other one of its secondaries. For each zone on the master that you need to replicate onto the secondary (all zones you are authoritative for, excluding the hints and localhost zones) you'll need to include a rule like:

     allow-transfer { 1.1.1.2; ];

where 1.2.3.4 is the IP of the secondary. On the secondary you'll have the same zones defined in named.conf. Each of your authoritative zone, excluding hints and localhost zones, will be of marked as slave instead of as master and you'll specify the master's IP, somethinge like:

     type slave;
     masters { 1.1.1.1; };
     allow-transfer { 1.1.1.1; };

Oh yes, you also need to list both servers as nameservers in each of the zone files.

A sample of what part of the master's named.conf file might look like is:

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

zone "localhost" {
        type master;
        file "local.zone";
};

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

zone "entrophy-free.net" {
        type master;
        allow-transfer { 10.1.0.2; };
        file "my-dom.tld.zone";
};


And on the secondary that same part would look like:

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

zone "localhost" {
        type master;
        file "local.zone";
};

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

zone "entrophy-free.net" {
        type slave;
        allow-transfer { 10.1.0.1; };
        masters { 10.1.0.1; };
        file "my-dom.tld.zone";
};

And in each of the zone files you'd have:

       IN NS  name-of-master.my-dom.tld.
       IN NS  name-of-secondary.my-dom.tld.
0
 

Author Comment

by:choccarlm
ID: 7008859
The trouble is, is that I have several hundred domains, so it will be quite hard to manage 2 servers with different type's of zones (Master & slave). Is there a way to get the master dns server to copy the zones and named.conf in the correct format across to the slave server?

Is there a perl script of some sort that will do the job?

Cheers
0
 
LVL 40

Expert Comment

by:jlevie
ID: 7009229
I don't know of a ready made tool for managing the secondaries named.conf, but then I've never loooked very hard for one. It wouldn't be very difficult to craft such a script since the config for the secondary is derived from the config for the master. You'd need to make sure that all zones defined on the master were in a standard format, of course.

If you want to send me a copy of your named.conf (to jim@entrophy-free.net) I'll take a crack at writing a perl script that would generate the secondary named.conf.
0
 
LVL 15

Expert Comment

by:samri
ID: 7010769
choccarlm,

Not sure what your OS is, but if you happens to be running some kind of Unix variance, drop by http://www.webmin.com/ It has a nice Web based interface for sysadmin stuff, and yes, bind modules are also available..
0
 

Expert Comment

by:EdUSC
ID: 7017111
Hi,

Don't put the allow-transfer {}; statement on the slave.  That should go on the master and have the slave server as the arguement.  Another tip is to have only your slaves performing your query resolution.  That way your master is safe behind a firewall and only allowed to send zone transfers to your slaves.

One redundant way to do it, is to have a master and two slaves.  The master is on your private net with the two slaves out on your DMZ.  Use a firewall to lock down the traffic to and from your master to allow only transfers to the slaves. Make the slaves non-recursive and do not allow transfers on the zone records.

EW
0
 
LVL 12

Expert Comment

by:j2
ID: 7029680
EdUSC

Of cource you should have allow transfer on the slave, if for no other reason then to prevent people from doing zone-stealing.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Expert Comment

by:EdUSC
ID: 7030332
True.  I realized that after I sent the comment that there should be an allow-transfer {none;} in the slaves as well.

Oops.  That's what I get for speaking w/o notes... :o)
0
 

Expert Comment

by:CleanupPing
ID: 9078491
choccarlm:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 15

Expert Comment

by:samri
ID: 9079916
i'll go for the 1st comment by jim.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 9106049
CC
0
 
LVL 15

Expert Comment

by:samri
ID: 9107029
ahoffmann: CC ?...  Another Spanish word ?
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 9107293
> CC ?...  Another Spanish word ?
LOL

s/CC/Cc:/ && s/Cc:/carbon copy/ && s/carbon copy/I'll second that/
not very spanish, isn't it?
;-)
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now