Çaylakpenguen Blog

VestaCP Slave DNS Name Server using Bind on Raspberry Pi

Setting up a slave name server on the Raspberry Pi

I use VestaCP to host my main websites, so I needed to set up a second nameserver on a different IP. I am using my Raspberry Pi as a secondary nameserver and this will document how to set this up. Commands done on the Raspberry Pi are in red and those done on the main web server are in blue.

First, install Bind9 on the Raspberry Pi:

Take a look at the bind config on the VestaCP server:

This is what the default looks like for VestaCP. You can see any zones you have set up at the bottom as a master, using yourdomain.com as an example:

Now, we need to change the options to allow transfer of zone information to our Raspberry Pi whenever a change is made. Open the options file on the VestaCP webserver:

An example IP of is shown, but you must youse the external static IP of your Raspberry Pi. Add these two lines:

So it looks like this below:

Thats all we have to do on the VestaCP master server. Now on to the Raspberry Pi slave DNS server. We need to add the zones to the local config on the slave, so it knows what and where to go. Open the local config file on the Raspberry Pi:

Add the zone at the bottom of the file as shown below. Change to your VestaCP master IP address and yourdomain.com to, um, your domain. If you are hosting more than one domain, just add more zones:

It’s good practice to add an allow-notify for your slaves public IP to prevent “refused notify from non-master” errors as it likes to be able to talk to itself! We can add this in the options file:

Now add this line before the end of the options section, changing the IP to suit

Almost done. Make sure port 53 is open on both machines for TCP and UDP. Now restart bind on the Raspberry Pi:

And then on the VestaCP machine:

Thats all folks! Now, whenever you make a change to any DNS settings in VestaCP, it should pass them over to your slave DNS. Note: If you add a new domain, you will have to manually add the new corresponding zone on your slave. You can check to see if its working by looking at the zone file on the Raspberry Pi:

Don’t forget to add the nameservers as hosts at your domain registrar. You can check to see if everything is behaving itself by entering your domain name at dnscheck.pingdom.com

I hope that helps you getting a second DNS working!


Kaynak Site: http://j0hn.uk/vestacp-dns-slave/

( Toplamda 8 , bugün 1 kez ziyaret edilmiştir )


Truva Linux takımıyla 2006'da tanışan "Çaylak Penguen" -BASH- betiklerine bayılır. Truva'nıñ çekirdek derleme işleri ile çalışan cd tasarımıyla uğraşmaktadır.

Add comment

Bir Cevap Yazın

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Web Hosting Sponsorumuz

E-Posta Listelerimiz

Web Hosting Sponsorumuz

E-Posta Listelerimiz

Web Hosting Sponsorumuz

E-posta Listelerimiz

FreeBSDRocks Qmail

Return to Top ▲Return to Top ▲
%d blogcu bunu beğendi: