Exporting NicTool DNS data to tinydns
To export zone data from NicTool to DJBDNS, you must have several things set up.
1. Create the nameservers in NicTool - Log into via the web interface, create a sub-group if desired (recommended), and then add some nameservers within that subgroup.
2. Configure the tinydns server. This assumes you have djbdns already installed. Typically you configure a tinydns server with a command as shown.
tinydns-conf tinydns tinydns /usr/local/tinydns 10.0.0.1The use of tinydns:tinydns for the user/group is arbitrary. You can use any username/group you'd like, but doing so will require extra effort on your part..3. Install the nt_export_djb program. This program is written in C++ for performance as it does the actual exporting of data from MySQL to the tinydns data files.
/usr/local/www/NicToolServer-2.03/sys/djb
make
make install4. Configure the NicTool export process.
I suggest adding the user "nictool", and have your export processes run as the nictool user. Add the user using your system password editing tools (adduser, useradd, etc). Then proceed as shown.
cd /usr/local/www/NicToolServer-2.03/sys/djb/nameserverAt this point the export process is running. Ctrl-C to cancel.
./install.pl /usr/local/nictool-ns1 NN nictool bin localhost nictool nictool secret mysql
cd /usr/local/nictool-ns1
./run (wait 10 seconds, ignore any errors)
Ctrl-C (cancel)
./run
5. Set up SSH keys for rsync updates
su - nictoolWhen you ssh to your nameserver, you'll be prompted to accept it's host key. You should then be logged in successfully. This must work in order for updates to happen automatically.
ssh-keygen -d
su - tinydns
ssh-keygen -d
cat ~nictool/.ssh/id_dsa.pub >> ~tinydns/.ssh/authorized_keys
setuidgid nictool ssh tinydns@ns1.example.com
6. Add servers to supervised directory.
** FreeBSD ports **
echo "svscan_enable=\"YES\"" >> /etc/rc.conf
/usr/local/etc/rc.d/svscan.sh start
ln -s /var/service /service
** FreeBSD ports**
ln -s /usr/local/tinydns-ns1 /service
ln -s /usr/local/nictool-ns1 /service
7. Configure remote servers.
ssh ns2.example.com
cd /usr/ports/dns/djbdns
sudo make install clean
cd /usr/ports/net/rsync
sudo make install clean
echo "svscan_enable=\"YES\"" >> /etc/rc.conf
mkdir /var/service
ln -s /usr/local/tinydns-ns2 /service
/usr/local/etc/rc.d/svscan.sh start
tinydns-conf tinydns tinydns /usr/local/tinydns-ns2 10.0.0.2
chown -R tinydns /usr/local/tinydns-ns2/root
tail /service/tinydns-ns2/log/main/current
exit (return to nictool master)
scp ~nictool/.ssh/id_dsa.pub tinydns@10.0.0.2:.ssh/authorized_keys
NicTool API