
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
212
|
Chapter 6: Securing Domain Name Services (DNS)
3. Give the primary server permission to write to the secondary server via ssh.
4. Edit /service/tinydns/root/Makefile. If your secondary server’s address is 192.193.
194.195, your Makefile should look like this:
remote: data.cdb
rsync -az -e ssh data.cdb 192.193.194.195:/service/tinydns/root/data.cdb
data.cdb: data
/usr/local/bin/tinydns-data
You will normally be prompted for a passphrase by ssh. To avoid this, create a key
pair and copy the public key to the user’s directory on the secondary server. Details
can be found in the SSH sections of Chapter 4.
That’s it! Now, whenever you make changes to tinydns, whether through the helper
applications or by directly editing zone files and typing
make to publish them, the
database data.cdb will be copied to the secondary server. Using rsync guarantees that
only changed portions will be copied. Using ssh guarantees that the data will be
encrypted in transit and protected against snooping or modification.
Alternatively, you can rsync the datafile rather than the data.cdb database and then
run make on the secondary server to create the database.
Migrating from BIND
If you are only using BIND as a caching server, then installing dnscache will replace
BIND completely. Don’t forget to turn off the ...