bind9 uj slave zona automatikusan

Van arra lehetoseg, hogy egy secondary slave dns szerveren ne kelljen kezzel minden zonat felvenni, hanem fogadja az osszes domaint automatikusan a masterrol? Tehat ha felveszek egy uj zonat a primary-n, az named reload utan automatikusan atkeruljon a slave-re. Ez pl. tudja, de win32-es es commercial.

A secondary Simple DNS Plus server can be configured as a "slave" server, meaning that all updates on the primary server are automatically transfered to the secondary. This includes creating and deleting zones.

Thx.

Hozzászólások

Ok, lemondok a bind9-rol, egyeb opensource linux alatt mukodo dns tud ilyet?

djbdns rsync replikációt csinál(hat)

Mik

Nem. De:
http://www.lifewithdjbdns.com/
http://www.lifewithdjbdns.com/#DNS%20secondaries

6.3. DNS secondaries
6.3.1. tinydns to tinydns
6.3.1.1. copy the data.cdb

You can just copy the generated data.cdb to the second machine (using rsync over ssh for example). The data.cdb becomes somewhat larger than the data file, so this option is only useful in an local network. Note: data.cdb is architecture independent, so it's even no problem if you are using different OS's. I don't prefer this method. Storing the data file on multiple machines gives me an extra measure of security in case my primary fails. Your mileage may vary...

If you do copy data.cdb, you don't need to do anything on the secondary end to make the new data become live, as tinydns works directly off the disk file and will notice the update immediately. However, you must make sure that the file isn't moved into place until it's completely copied, so either propagate it with rsync, which does the right thing automatically, or script something like

scp data.cdb secondary:/etc/tinydns/root/data.cdb-new && \
ssh secondary mv /etc/tinydns/root/data.cdb-new /etc/tinydns/root/data.cdb

6.3.1.2. using rsync over ssh

This is the method I prefer. It is even usable if your tinydns servers are connected through slow lines, for example at different locations, because only changes get transferred, compression is also done.

rsync -e ssh -az /etc/tinydns/root/data $host:/etc/tinydns/root/data
ssh $host "cd /etc/tinydns/root; make"

where $host is your second tinydns server. NB: both rsync and ssh share a problem, and that is that other programs want to execute them in various contexts --- e.g. rsync wants to execute ssh, and rsync wants to invoke itself via ssh on the remote system. Furthermore, both pkgs default to installing into /usr/local/ which built from sources with the default config, and /usr/local/bin isn't on the default path in many shells. The upshot of all this is that you may need to take the above command and rewrite it as something like

/usr/local/bin/rsync -e /usr/local/bin/ssh \
--rsync-path=/usr/local/bin/rsync ...
instead of the simpler
rsync -e ssh ...

For this reason, I generally try and ensure that the paths /usr/bin/rsync and /usr/bin/ssh will work, even if they aren't the default paths installed, and will add symlinks to my systems to make them work if needed.

Mik

powerdns mysql backenddel tud vmi supermaster v milyen modot amivel adott ipcimekrol automatikusan felveszi az uj zonakat. az sql teljesen nem marad ki, de nem kell pl replication.

en ezt hasznalom: ez nyaggatja a slavet hogy legyenszivesfrissiteni


#!/usr/bin/perl -w

# usage: dnsnotify zone slave [...]
# example: dnsnotify example.org 1.2.3.4 1.2.3.5

use Net::DNS;

$zone = shift;
@master_ns = @ARGV;

$res = new Net::DNS::Resolver;

foreach $ns (@master_ns) {
        $packet = new Net::DNS::Packet($zone, "SOA", "IN");
        die unless defined $packet;

        ($packet->header)->opcode("NS_NOTIFY_OP");
        ($packet->header)->rd(0);
        ($packet->header)->aa(1);

        $res->nameservers($ns);

        # Prints outgoing packet - the NOTIFY
        # $packet->print;

        $reply = $res->send($packet);

        if (defined $reply) {

                        print "Received NOTIFY answer from " . $reply->answerfrom . "\n";
                        # Print received packet - the answer
                        # $reply->print;

        } else {

                warn "\$res->send indicates NOTIFY error for $ns\n";
        }
}

exit 0;

--
A vegtelen ciklus is vegeter egyszer, csak kelloen eros hardver kell hozza!