Exporting NicTool DNS data to tinydns
To export zone data from NicTool to tinydns, you must have several things set up.
1. Create nameservers in NicTool - Log into via the web interface, create a sub-group if desired, and then add a nameserver.
2. Configure tinydns. This assumes you have djbdns already installed. A typical configuration is shown.
The 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..tinydns-conf tinydns tinydns /usr/local/tinydns/ns1 10.0.0.1 axfrdns-conf tinydns tinydns /usr/local/axfrdns/ns1 /usr/local/tinydns/ns1 10.0.0.13. Configure the NicTool export user.
Using your system password editing tools (adduser, useradd, etc), add the user 'nictool' for the export processes to run as.
4. Set up SSH keys for rsync updates
su - nictoolWhen you ssh to your nameserver, you'll be prompted to accept its 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.com5. Do a manual export
cd /usr/local/nictoolThe nt_export.pl script will create a data-NS directory in the current working directory. Inside will be the data file exported by NicTool with all your zone data. Also left behind will be a 'run' file. That run file can be run from cron, init, or daemontools. If the information about the nameserver is correct in the database, and the nictool user has permission to SSH to the nameserver as the 'tinydns' user, then the export will likely succeed.
mkdir ns1
cd ns1
ln -s ../server/bin/nt_export.pl .
./nt_export.pl
./nt_export.pl -nsid N
6. Test the NicTool export process.
./run (wait 10 seconds, ignore any errors)At this point the export process is running. Ctrl-C to cancel.
Ctrl-C (cancel)
./run7. Add servers to supervised directory.
** FreeBSD ports **
echo "svscan_enable=\"YES\"" >> /etc/rc.conf
/usr/local/etc/rc.d/svscan.sh start
mkdir /var/service
ln -s /var/service /service
** FreeBSD ports**
ln -s /usr/local/tinydns/ns1 /service
ln -s /usr/local/nictool/ns1 /service8. Configure remote servers.
ssh ns2.example.comThere is an older version of this document for use with the c++ program. .
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