Force failed DNS lookup to search my local domain?

Mark_Andrews at isc.org Mark_Andrews at isc.org
Fri Jan 24 05:13:04 UTC 2003


> 
> Hello, all,
> 
> I apologize for the poor subject line - I had a hard time trying to
> accurately describe what I want to do in 10 words or less.  I would
> like to force a failed fqdn dns lookup to search my local domain on my
> bind9 server, similar to what would happen if a partially qualified
> domain name was used.  For example, if I do a dns lookup on
> test.bogus, I get the following output from my packet sniffer
> (tethereal)
> 
> -----------------
> 64.245274 192.168.1.60 -> ns.mintypickle.homelinux.net DNS Standard
> query A test.bogus
> 
> 64.311459 ns.mintypickle.homelinux.net -> 192.168.1.60 DNS Standard
> query response, No such name
> 
> 64.314779 192.168.1.60 -> ns.mintypickle.homelinux.net DNS Standard
> query A test.bogus.mintypickle.homelinux.net
> 
> 64.315873 ns.mintypickle.homelinux.net -> 192.168.1.60 DNS Standard
> query response A 192.168.1.1
> -----------------
> 
> 
> This is exactly the behavior I want.  It can't find test.bogus, so it
> checks to see if that is a host on my local domain,
> mintypickle.homelinux.net.  Since I have a wildcard entry set up,
> xxxx.yyyy.mintypickle.homelinux.net will always resolve to
> 192.168.1.1, just like I want.
> 
> However, I would also like this to happen if I look up an address
> which includes a top-level domain.  for example, I want it to behave
> exactly as above if I were to look up test.bogus.net, but currently
> all I get is this:
> 
> -----------------
> 31.259196 192.168.1.60 -> ns.mintypickle.homelinux.net DNS Standard
> query A test.bogus.net
> 
> 31.259887 ns.mintypickle.homelinux.net -> 192.168.1.60 DNS Standard
> query response, No such name
> -----------------
> 
> Bind9 is smart enough to know that .net is a top level domain, so it
> doesn't look any further than that.  Can I "dumb it down" somehow?  I
> would like it to do a query on
> test.bogus.net.mintypickle.homelinux.net, which would then resolve to
> 192.168.1.1.  Is there any way I can cause my local bind9 server to
> kind of "forget" that .net, .com, .org, etc are top level domains, and
> search my local domain for those addresses if the initial lookup
> fails?
> 
> Thank you,
> Dave

	Firstly it is clients that decide whether to search or not.  You
	obviously did lookups under different conditions.

	Secondly it is usually a BAD idea to have a wildcard in a search
	list.  It tends to have unexpected consequences.

	Mark
--
Mark Andrews, Internet Software Consortium
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: Mark.Andrews at isc.org


More information about the bind-users mailing list