Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two VPS. I would like to use second one as a secondary dns server. both VPS are Debian 6. how I could do that? is it enough that I install bind9 and copy zone files from first VPS to second VPS?

share|improve this question
What you want on VPS2 is called "slave mode". The slave server (VPS2) will AXFR the zones automatically from the master (VPS1). Search for "BIND slave". Notice that free secondary DNS services exist, and they can save you this setup and maintenance hassle. – michele Jul 1 '12 at 12:00
up vote 5 down vote accepted

First of all if you want to setup a secondary DNS server you will need to define who is the master and the slave.

For example on the VPS1 server the master entry should like something like that:

zone "" IN {
   type master;
   file "master/";
   allow-transfer { VPS2_IP ;  };

On the VPS2 machine where you will run the slave DNS add this entries:

zone "" IN {
       type slave;
       file "";
       masters { VPS1_IP; };

Once you restart both DNS servers the slave server (VPS2) will automatically transfer the zone file from the master (VPS1).

You also need to change the zone file and add the new DNS server. Add a line like that

@    IN   NS
ns2  IN   A     VP2_IP

Now the only thing left is to inform your domain registrar of the changes. Only after that your new NS will be public and used by clients.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.