Web Hosting Talk







View Full Version : DJBDNS on Debian - Slave to Master


phpjames
02-03-2004, 03:01 PM
DJBDNS on Debian - Slave to Master

I am trying to get DJBDNS to be a slave off a master server. The bind master is setup to allow the slave requests. Does anyone know how to accomplish this? I am unclear after how to proceed after reading the docs. I do not want to use any rsync method.

Senario:

ns2 (debian/djbdns box) needs to suck records from ns1(bind).

Please advise. Thanks!!!!

Naes
02-03-2004, 08:06 PM
Here you go:

/path/to/tcpclient ns.YOURSERVER.com 53 axfr-get ZONE.com file file.tmp

If it works correctly, you will get a "file" in the directory you ran this from. Best to set it up via cron then maybe another cron job to reload tinydns:data.

phpjames
02-03-2004, 08:45 PM
After running:

/usr/local/bin/tcpclient ns1.domain.com 53 /usr/bin/axfr-get zone.com file file.tmp

I get the following:
axfr-get: fatal: unable to parse AXFR results: protocol error

Once I have the file.tmp where do I place it.

Naes
02-03-2004, 09:01 PM
make sure you are allowed (via bind's config) to do zone tranfers. You may have bind set to deny that machine you are running axfr-get on.

phpjames
02-03-2004, 09:38 PM
The master server should be set to do zone transfers.

phpjames
02-03-2004, 09:57 PM
Ok it works now. I needed to change the zone.com to the actual domain name I want. Now that I have the file...where do I place it. Is it ok to leave it in the djbdns/bind format that axfr-get creates?

Naes
02-04-2004, 01:57 AM
you need to take that file and merge it into the tinydns data file....

then rebuild tinydns's data file.

phpjames
02-04-2004, 02:06 PM
I found out how to merge the data files:
Take the file and cd /etc/tinydns/root

$ sort -u filename > data
$ make

This will update the database of records.

Now that this is done. How do I restart tinydns. I can not see 53 port open when running an nmap scan and the server is not responding to queries. Thanks!

phpjames
02-04-2004, 02:44 PM
this is the result of a portscan on my box. Damn port 53 wont open:

$nmap -p 53 localhost

Starting nmap V. 2.54BETA31 ( www.insecure.org/nmap/ )
The 1 scanned port on localhost (127.0.0.1) is: closed


Help. Same results from outside. Starting tinydns doesn't open the 53 port:

ls -s /etc/tinydns /service

Naes
02-04-2004, 03:23 PM
try

svc -u /service/tinydns

or to sighup svc -h /service/tinydns

You should have also run the conf program for tinydns. This will tell it what ip, port, user etc... to run as.

phpjames
02-04-2004, 04:10 PM
Did that still nothing when running an nmap. 53 seems to be closed.

choon
02-04-2004, 04:53 PM
I believe you are running daemontools to supervise your tinydns right? What is the output for the one of the following command:
netstat -an|grep 53
netstat -ape|grep tinydns
ps auwx|grep tinydns
svstat /services/*
Assuming your services are in /service directory. If you did try:
svc -h /service/tinydns
OR
svc -u /service/tinydns
And still unable to startup tinydns by doing the checking on the netstat, ps and svstat commands provided then please check your log:
cat /service/tinydns/log/main/* | less
Just my thoughts ;)