Wildcarding an Entire Domain

Barry Margolin barmar at genuity.net
Tue Jul 10 15:39:00 UTC 2001


In article <9if57r$260 at pub3.rc.vix.com>, Jim McDonald  <Jim at mcdee.net> wrote:
>
>Hi,
>   I'd like to be able to CNAME an entire domain, including subnets, such
>that *.foo.com -> *.bar.com for any host.  All of the wildcarding that
>I've seen so far seems to be simplistic matching, this is a bit more
>complex and I'm having trouble finding out how to do it.  Basically, I'm
>trying to transcribe an entire domain.  Any ideas?

There's no built-in way to do this type of CNAMEing.  You could write a
perl or awk script that reads one DB file and creates another one full of
CNAME records.

>Some examples, in case the above isn't clear
>
>Client looks up host1.foo.com; DNS server says that host1.foo.com is a
>CNAME for host1.bar.com
>
>Client looks up host2.subnet1.foo.com; DNS server says that
>host2.subnet1.foo.com is a CNAME for host2.subnet1.bar.com

Is the same server the master for both domains?  If so, you can use the
same DB file for both domains.  Just make sure that all the names on the
left-hand side of records are relative names (use @ for the domain name
itself).

-- 
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