Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Jul 1998 12:02:38 -0400 (EDT)
From:      CyberPeasant <djv@bedford.net>
To:        vagner@kf7nn.com (George)
Cc:        questions@FreeBSD.ORG
Subject:   Re: namedb
Message-ID:  <199807081602.MAA00747@lucy.bedford.net>
In-Reply-To: <XFMail.980707225735.vagner@kf7nn.com> from George at "Jul 7, 98 10:57:35 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
George wrote:
> i have namedb running on my internal net and also have gateway="YES" in rc.conf

Eh. That would be "named", the name of the daemon, or BIND, the name
of the system.

> my question is my other machines on the internal net i have set the gateway to
> the ip address of the freebsd machine and also set the dns search order 
> to first freebsd machine and then to the outside dns server, but if i leave in
> the internal ip address for the dns server i cant do any lookups although i can
> ping specific ip addresses but not host names.

The search order does not go through the list of nameservers until
a name is resolved -- it goes through the list until it finds a
responding nameserver, period.  If you want to handoff failed
lookups on /your/ named to another NS, then use the "forwarders"
line in named.boot.

> it seems that when the internal machines ask the freebsd namedb server about 
> a site it dont know about they receive a not found response and therefore
> come back as host not found error.

That's right. Your configuration below did not seem to include a
reference to the root servers.

> so what good is an internal namedb server if you cant use it to query the
> outside world?

It is of no use whatever, obviously, except on a LAN too unwieldy for
/etc/hosts or NIS. (There are such, of course).

> 
> maybe i have something wrong with the config.

Yup. I believe so.

> here it is...

 ... with comments removed for readibility:

> 
> $ cat named.boot
> 
> directory       /etc/namedb
> 
> ; type    domain                source host/file                backup file
> 
> cache     kf7nn.com             named.local                     named.root
> primary   0.0.127.IN-ADDR.ARPA  localhost.rev
> 

Unless there is some weird new way to setup named, no line here is
correct except the directory spec. You should look more like:
(I assume that kf7nn.com is the class C 204.251.27.XXX)

directory	/etc/namedb

cache		.			named.root

primary		localhost		localhost
primary		0.0.127.in-addr.arpa	localhost.rev

primary		kf7nn.com		kf7nn.com
primary		27.251.204.in-addr.arpa	kf7nn.com.rev


The named.root mentioned is a list of the root domain servers that
shipped with the system, or which can be gotten from the internic.
(ftp.rs.internic.net, IIRC).

This setup is for a nameserver that will be authoritative for
 forward lookups of kf7nn.com and reverse lookups on 204.251.27.XXX.
Other requests will be handed off to the root servers.

Now, I have a suspicion that your original setup might be some kind
of "newfangled" local caching-only named setup, about which I know
nothing, and whose utility is to my thinking, doubtful. In that
case, you might get away with simply adding a "forwarders" line in
named.boot,

forwarders	1.2.3.4	

Where 1.2.3.4  is the name of a "real" nameserver.

It's difficult to diagnose a named problem just from 'named.boot'.
The contents of the zone files are usually the source of most
problems. Try running nslint (port or package) and/or dnswalk
for some error messages.

When starting named, keep an eye out for error messages on the
console or in /var/log/messages. If you can't find "named: ready
to answer queries", then it is either logging to some place weird,
or is not being started.

Dave
-- 
Sancho Panza: `Microsoft Windows NT Server is the most secure network 
	operating system available.'
Don Quixote: `You are mistaken, Sancho.'

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807081602.MAA00747>