June 24th, 2002, 11:10 PM
DJBDNS ns1 and ns2
Hi, right now I'm setting up ns1 and ns2 for a server to run dns. To setup tinydns i'm using the line 'tinydns-conf tinydns dnslog /etc/tinydns ip.is.he.re'
I'm not sure if this ip setup is the 'right' way, but if you have any suggestions, I'd love to hear them. As of right now, there is one ip for the server. There is another ip for ns1, and another for ns2. (I'm not sure if it's right to make ns1 and the server the same) I guess I could probably use the ns1 ip as the server ip, but is it good to have the servers hostname as ns1? Is that right?
The main question is how to setup tinydns. I'm not sure of what ip I should put there. Should it be ns1? Shoudl I put the ns1 ip there and then add the ns2 ip to /etc/tinydns/env/IP so that there is the ns1 and ns2 ips in there? Thanks!
June 25th, 2002, 10:51 AM
>> To setup tinydns i'm using the line 'tinydns-conf tinydns dnslog /etc/tinydns ip.is.he.re'
I don't remember what's your server OS. If it's any BSDs, mkdir a /var/djb directory and use /var/djb/tinydns instead (my standard), just don't use djb's hier standard (/etc/tinydns) because it's highly non-standard.
>> I'm not sure if it's right to make ns1 and the server the same
I'm confused. How many box do you have? How many IP?
>> is it good to have the servers hostname as ns1?
>> and then add the ns2 ip to /etc/tinydns/env/IP
You can't do that. You need to run multiple tinydns and bind each of them to different IP using the tinydns-conf script. Anyhow, running both ns1 and ns2 on the same box defeats the purpose of having a slave nameserver in the first place.
June 25th, 2002, 05:19 PM
I would like to use FreeBSD personally , but the person who I am helping bought a Sun server. It's Solaris 8.
There is 1 box, and we have about 20 ips as of now that are ready for use. I'm just wondering if the ns1 ip should be the ip to the server. Which would make the hostname of the server ns1.domain.com.
Would it just be wasting an ip if we made the server and ns1 different ips?
I've never setup djbdns with nameservers like this, so I'm not totally clear on how to. I know that when you run the tinydns-conf program, you are telling it to use the ip which dns will listen on. We haven't found someone to swap dns servers with yet, so for now I want to run ns1 and ns2 on the same server. I just don't know if I need to have it listen on both of the ips or not. For instance, if we were to switch secondary dns servers with someone else, would we have to run two instances of tinydns for their ns2 ip? That just still seems odd to me because wouldnt' that make two data files?
Thanks for the help!
June 25th, 2002, 05:34 PM
I was just thinking and I'm still confused on this. For ns1 and ns2, wouldn't I just do something like this in the data file?
I guess the main things that I don't get are, is it correct to set the hostname to ns1. And second, what ip should tinydns listen on?
June 25th, 2002, 07:25 PM
>> There is 1 box, and we have about 20 ips as of now that are ready for use
Tjen choose two IPs and set your NIC to 188.8.131.52 and create alias on the NIC and assign 184.108.40.206 to it. Note, this is the very first step you must do before configuring tinydns.
>> Would it just be wasting an ip if we made the server and ns1 different ips?
I don't see there's a problem with a hostname like "mail.domain.com", "ns1.domain.com" or the like. Since he has plenty of IPs, why can't he set his system hostname to ns1.domain.com?
>> you are telling it to use the ip which dns will listen on
Make sure your NICs are setup accordingly before doing this.
>> I just don't know if I need to have it listen on both of the ips or not
Yes you do. You need to run tinydns-conf twice, with different IP and path (i.e. /var/djb/tinydns-master and /var/djb/tinydns-slave respectively or whatever name you like).
>> wouldn't I just do something like this in the data
That'd be A record only, and you definitely need more than that. Here's an example of /var/djb/tinydns/root/data (/service/tinydns/data):
Sorry, I know this is a little old but I had one more queston...
I setup /var/djb/tinydns-master and /var/djb/tinydns-slave.
For the data file in /var/djb/tinydns-master/root I've set it up like you show. For the data file under slave, would it be like this?
Or would I change it to have:
For the data file under slave that should only be:
>> Or would I change it to have:
# Do not edit this file
# data.cdb is to be copied from ns1
You can't. That Z line, the 2nd one followed by the colon (ns2.domain.com) is known as SOA record's MNAME. One domain can only have ONE SOA record, usually the MASTER nameserver of that domain.
Just so you know, only tinydns-master has the authority to modify data, rebuild it to data.cdb. tinydns-slave just can't do that because its data.cdb is supposed to by sync'ed from tinydns-master. Have a look at http://www.lifewithdjbdns.org/