LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   OpenBSD 3.5 + djbdns (https://www.linuxquestions.org/questions/%2Absd-17/openbsd-3-5-djbdns-252171/)

Gsee 11-07-2004 04:31 PM

OpenBSD 3.5 + djbdns
 
Hello all, I'm trying to build an OpenBSD 3.5 box as a DNS server using djbdns. Can anyone PLEASE tell me how to get djbdns installed? Everywhere I've looked has instructed me to fetch the src/ports tree but from what I can make out (I'm not totally confident with CVS) but from what I can tell I haven't got enough disk space to build the tree. After a few hours of "building" it ends by saying there's isn't enough disk space.

I'm familliar with keeping FreeBSD up to date but am not yet familliar with OpenBSD. As far as I can tell I was getting the CVS correct except for the small issue of diskspace.

I have a 2Gig hard drive (it's only a DNS server) perhaps what I should be doing is rebuilding it with different partition sizes. Can anyone suggest partition sizes respective to my hard drive size that should suit?

Any help would be great. As I've said I'm on shaky ground with OpenBSD so if someone can just help get out of trouble one way or another that would be great. I'd prefer to use djbdns if it still exists and is maintained. But if not, what do we suggest? Surely not BIND?

Thanks in advance,
Gsee

lazlow69 11-07-2004 09:53 PM

Glad to see you are trying an OpenBSD / djbdns combo... I tend to think this is a deadly sharp way of doing DNS work myself. I would encourage you to head over to http://cr.yp.to and read the docs on how to go about the install. There are three packages you have to download and install for it to work: ucspi-tcp, daemontools, and finally djbdns. They are all ultra tiny packages, and compile real peppy like even on an old PI, I couldn't image you needing more than 2-3 megs disk space for the whole trio, not to mention no more than that in RAM for operation. Take some time and read through Dan Bernstein's (the author of the packages) excellent step by steps on the process, and you should be up and running. Post here if there are more concerns after following through on this.

using ports doesn't make much sense as this is a very specific and unique daemon system this fellows developed, I think you'll appreciate it once you've gone through once or twice and done it.

Gsee 11-08-2004 05:40 AM

Well I followed the installation instructions as per:

http://cr.yp.to/djbdns/install.html

and then the setup procedures as per:

http://cr.yp.to/djbdns/run-cache-x.html

but it doesn't seem to be working. Each step seemed to proceed correctly and after changing the resolv.conf of my workstations to nameserver 192.168.1.12 (the IP address of my DNS) they can no longer resolve.

I should mention that since setting this up my DNS' hard drive is either being read from or written to on a regular one second interval - possibly writing errors to a log file?

Are there any other pages I should have followed in addition to the ones I've done?

Thanks for your fast and polite reply.

Gsee

lazlow69 11-08-2004 10:00 AM

I think I've got an idea... you have your resolv.conf depending on just your djbdns box, so if your machine doesn't have the mapping, it fails... you need a second line I believe that has the nameserver of your router or of your upstream DNS server from your ISP

nameserver 192.168.1.12
nameserver 192.168.1.1


so it can resolve out to a fallback, and then cache the results for itself. The harddrive writing is probably all going to a file called, I believe /etc/dnscache/log/main/current or something in the log subdirectory there, which, when cat'd, will have a string of errors pertaining directly to the machines inability to resolve beyond itself.

Goodluck.

chort 11-08-2004 02:52 PM

Errors should be in /var/log/daemon

There is no port of the DJB stuff on OpenBSD any more because of DJB's silly not-completely-free license.

Gsee 11-09-2004 05:25 AM

Ok... to save confusion let's pretend I have two computers (I don't).

Computer one is called MyDNS -> IP 192.168.1.12

Computer two is my Gentoo workstation -> IP 192.168.1.2

Now... following your instructions above I changed the resolv.conf of my Gentoo box to
nameserver 192.168.1.12
nameserver 192.168.1.1

And when opening a browser to lookup a hostname it took a while before it fell through to finding it. But it DID find it. I thought that's probably because the Gentoo box failed with 192.168.1.12 and skipped to 192.168.1.1 for the DNS. So I editted resolv.conf on the Gentoo box to:
nameserver 192.168.1.12

and tried a different site and found it couldn't resolve :(

BUT the interesting thing is... if I then went to the same site as before I could browse to it without a problem.

For example

Gentoo resolv.conf:
nameserver 192.168.1.12
nameserver 192.168.1.1

Firefox -> www.google.com

chug chug chug chug resolve.

Gentoo resolv.conf
nameserver 192.168.1.12

Firefox -> www.altavista.com
chug chug chug chug failed...

BUT!!!!!

still with Gentoo resolv.conf:
nameserver 192.168.1.12

firefox -> www.google.com
Instantly resolves to the site and THEN google search WORKED!!

My novice belief is that MyDNS is caching the DNS data but it's failing to lookup? PErhaps my Netcomm 1300NB (192.168.1.1) isn't forwarding the DNS requests?

I'm half way there!

Thanks guys

Gsee


All times are GMT -5. The time now is 03:57 PM.