Wildcard Domains in zone file?

Barry Margolin barmar at genuity.net
Tue Jun 20 14:53:02 UTC 2000


In article <394fac37.191533 at news.uk.uudial.com>,
Vortex <vortex at NOSPAMcaffeine-dot-org.uk> wrote:
>'lo,
>
>After being informed by a colleague that I could use "wildcard"
>domains in a BIND zone file, eg:
>
>*	IN A 195.184.236.248
>
>I decided I'd try and implement this, in conjunction with an Apache
>mod_rewrite rule (in the mod_rewrite bit of the Apache FAQ if anyone's
>interested) to give users on my system
>"www.[username].caffeine.org.uk" usernames, which I assumed I could
>accomplish with:
>
>www.*	IN A 195.184.236.248
>
>However, for some reason, the wildcard feature only works if it's the
>first character on the line, eg.
>
>*.foo	IN A 195.184.236.248
>
>...allows any *.foo.caffeine.org.uk name to resolve... but for some
>reason I can't get it working when the wildcard is prefixed.

DNS specification says that when the server can't find the name it's asked
for, it looks for the name "*".  It doesn't say anything about trying to
replace different parts of the name with "*", which is why you can't have
it embedded in the middle of a name.

>Any ideas on this (seemingly) undocumented feature and how it can work
>for the above situation?

It works the way it's documented to.  Did you look up "wildcard" in the
DNS&BIND index, or read the Wildcards section of RFC 1034?  If you didn't
actually read the documentation, how can you claim it's undocumented?

-- 
Barry Margolin, barmar at genuity.net
Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.



More information about the bind-users mailing list