Well, a month later and I'm back to working on this dns problem.

I tried to follow Mike's advice (found below), but I ran in to a
problem.  When I emerged djbdns, it never created anything called
dnscache.  It only created dnscachex, tinydns, and axfrdns.  And unlike
every other reference I've seen/read about, including Mike's below, it
was put in the /var directory, not the /etc directory.  I doubt the
directory change is an issue, and since I don't really care about acting
as a proxy dns to my internal network, I'm not sure I need dnscache, but
I could be wrong on both counts.

Anyway, it still won't work.  :(

I've added the domain and its aliases to the system using tinydns's
"add-host" and "add-alias".  For simplicity's sake, let's say my IP is
1.2.3.4 and my domain is foobar.com.  Here is the output I get when I
check on my setup:

> tinydns-get a www.foobar.com 1.2.3.4
1 www.foobar.com:
89 bytes, 1+1+1+1 records, response, authoritative, noerror
query: 1 www.foobar.com
answer: www.foobar.com 86400 A 1.2.3.4
authority: foobar.com 259200 NS a.ns.foobar.com
additional: a.ns.foobar.com 259200 A 1.2.3.4

> svstat /service/tinydns
/service/tinydns: up (pid 932) 870016 seconds

> svstat /service/axfrdns
/service/axfrdns: up (pid 13218) 0 seconds

> dnsq a www.foobar.com 1.2.3.4
<at this point the system just sits there.  No returned value!>

> dnsqr a www.foobar.com
<at this point the system just sits there.  No returned value!>

> cat /service/dnscachex/log/main/current
@400000003fa61ab11f645e8c starting
@400000003fadc55d20421074 starting

Looking at tcpdump, If I call up a browser and try to reach
www.foobar.com I get this:

>tcpdump -i any | grep foobar
00:41:02.485868 lkhndnss02.rd.at.cox.net.58754 >
wsip-my-ip.hr.hr.cox.net.domain:  42193 A? www.foobar.com. (38) (DF)
00:41:13.480699 nrfkdnss02.rd.hr.cox.net.56943 >
wsip-my-ip.hr.hr.cox.net.domain:  25461 A? www.foobar.com. (38) (DF)
00:41:14.775501 192.168.0.9.32806 > ns1.hr.cox.net.domain:  38338+ A?
www.foobar.com. (38) (DF)

And that continues for a while, trying different permutations, like
localhost.foobar.com or www.foobar.com.localdomain, etc....

>tcpdump -i any | grep unreachable
01:35:49.816329 localhost.localdomain > localhost.localdomain: icmp:
localhost.localdomain udp port domain unreachable [tos 0xc0] 

In the end, the browser just says foobar.com could not be found.  :(

I've registered my machine/ip as a valid dns (and I get dns requests all
the time, but the above mentioned udp error suggests to me that they
aren't be fulfilled) and I've got apache set up to give me a domain back
(it works on another hosted domain that uses an external authoritative
dns server for discovery).

Does anyone have a clue as to what could be the problem?  Any help would
be appreciated.  :)

-Tom Caudron



> From: Mike Williams <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: [gentoo-user] djbdns setup questions
> Date: Sat, 18 Oct 2003 16:39:20 +0100
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Saturday 18 October 2003 14:58, Tom Caudron wrote:
> > I've googled til my fingers bled and all I cna find are how-to
> > describing how I cna set up djbdns to serve a home network (maybe I just
> > didn't know what I was looking at?).  Here's what I'm doing.
> >
> > I have registered a domain (we'll call it foobar.com) and I intend on
> > hosting it publicly from my home server, which is running on a cable
> 
> [snip snippty]
> 
> Right, basic setup.
> Tinydns listens on 127.0.0.1, dnscache(x) listens on an/the external 
> interface(s). Tiny is the resolver, dnscache the .... (brainfart moment).
> 
> My router has it's internal address in /etc/resolv.conf (it's 192 address).
> 
> Lets do this backwards, starting with dnscache.
> redshat root # cat /etc/dnscache/env/IP
> 192.168.0.1
> You will need dnscache, and dnscachex. One on the internal that will resolve 
> anything, and one on the external that will only resolve your domain.
> The files in /etc/dnscache/root/ip/ tell dnscache who is allowed access, in my 
> case
> redshat root # ls -lh /etc/dnscache/root/ip/
> total 0
> - -rw-------    1 root     root            0 Jul  1 02:43 127.0.0.1
> - -rw-r--r--    1 root     root            0 Jul  1 02:43 192.168
> I'm pretty sure an @ will allow anyone.
> 
> To tell it what it is authorative for, and where it go for the resolver put 
> files in /etc/dnscache/root/servers
> redshat root # ls -lh /etc/dnscache/root/servers/
> total 12K
> - -rw-r--r--    1 root     root           10 Jul  1 02:43 0.168.192.in-addr.arpa
> - -rw-r--r--    1 root     root          164 Jul  1 02:43 @
> - -rw-r--r--    1 root     root           10 Jul  1 02:43 home.gaima.co.uk
> redshat root # cat /etc/dnscache/root/servers/0.168.192.in-addr.arpa
> 127.0.0.1
> redshat root # cat /etc/dnscache/root/servers/home.gaima.co.uk
> 127.0.0.1
> redshat root # cat /etc/dnscache/root/servers/\@
> 198.41.0.4
> 128.9.0.107
> 192.33.4.12
> 128.8.10.90
> 192.203.230.10
> 192.5.5.241
> 192.112.36.4
> 128.63.2.53
> 192.36.148.17
> 198.41.0.10
> 193.0.14.129
> 198.32.64.12
> 202.12.27.33
> 
> Reverse for 192.168., forward for home.gaima.co.uk, and for anything else pick 
> a root server (default config I think).
> 
> 
> Now to tinydns.
> redshat root # cat /etc/tinydns/env/IP
> 127.0.0.1
> It only listens on localhost.
> Now all you need is the data.
> 
> A nameserver
> .home.gaima.co.uk:192.168.0.1:redshat.home.gaima.co.uk:259200
> Another nameserver
> .0.168.192.in-addr.arpa:192.168.0.1:redshat.home.gaima.co.uk:259200
> An A record, with PTR
> =redshat.home.gaima.co.uk:192.168.0.1
> A CNAME
> Cmrtg.redshat.home.gaima.co.uk:redshat.home.gaima.co.uk:86400
> An MX
> @home.gaima.co.uk:redshat.home.gaima.co.uk:redshat.home.gaima.co.uk
> 
> You'll have to read Dans docs on the data format, I can never remember :)
> 
> HTH
> 
> - -- 
> Mike Williams
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.3 (GNU/Linux)
> 
> iD8DBQE/kV6rInuLMrk7bIwRAnqEAJ4lQKee+8P6ROpq1INeFk1YxFWQqQCfWFBU
> urdoSJWz9me/akgKV1SC/8M=
> =ZalF
> -----END PGP SIGNATURE-----


--
[EMAIL PROTECTED] mailing list

Reply via email to