Wildcard oddity

Mark Andrews marka at isc.org
Tue Sep 30 04:39:34 UTC 2014


In message <20703.1412049161 at server1.tristatelogic.com>, "Ronald F. Guilmette" 
writes:
> 
> 
> My apologies for my earlier, arguably off-topic questions.
> 
> Now I have a real honest-to-goodness BIND question.
> 
> I have the following simple zone file installed as "test0.tristatelogic.com":
> 
> ===========================================================================
> $TTL 3600
> @       IN      SOA     server1.tristatelogic.com. hostmaster.tristatelogic.c
> om. (
>         1412047583 10800 3600 604800 3600 )
>         IN      NS      server1.tristatelogic.com.
> 
> *.colors IN A 127.0.0.2
> *.jason.purple.colors IN A 127.0.0.3
> ; *.purple.colors IN A 127.0.0.4
> ===========================================================================
> 
> Note that that last line is commented out.
> 
> Curiously, when I do this query:
> 
>    dig simon.purple.colors.test0.tristatelogic.com
> 
> I get back NXDOMAIN.  Why?

Because that is how wildcard processing works.  Go read RFC 1034,
Section 4.3.2. Algorithm.   Note the words "label by label".

Does the label colors exist?
Does the label purple exist?
Does the label simon exist?
Does the label "*" exist?

Mark

> Intutively I would have thought that this query would have been matched
> by "*.colors", but the presence of jason seems to be throwing a monkey
> wrench into the works for simon!
> 
> It is also rather perplexing that when I uncomment that final line,
> then things seem to work as expected, i.e. the dig shown above then
> matches _that_ record, and I get back 127.0.0.4 (which is indeed
> what intutively _should_ happen).
> 
> There must be something quirky about the wildcard matching rules that
> I'm not understanding.  Why do these two rules cause something (i.e.
> anything) within the colors subdomain to *not* resolve?
> 
> *.colors IN A 127.0.0.2
> *.jason.purple.colors IN A 127.0.0.3
> 
> _______________________________________________
> Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe
>  from this list
> 
> bind-users mailing list
> bind-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/bind-users
-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: marka at isc.org


More information about the bind-users mailing list