Wildcard domain resolving

Barry Margolin barmar at bbnplanet.com
Mon Apr 3 15:43:08 UTC 2000


In article <E12bmPK-0004ij-00 at serenity.mcc.ac.uk>,
Hubert Seiwert <bind-users at seiwert.com> wrote:
>X-No-Archive: Yes
>
>I would like to set up a DNS server that resolves any domain / hostname it is
>queried about to a certain IP address (it responds with a fixed A record
>regardless of the query content). The purpose is pointing a number of domains
>to an IP-based virtual server, saving me having to set up a zonefile for every
>domain. As far as I know, in BIND wildcards only work for subdomains and
>there's no way to set up records that match *.com or *.

You could use the same zonefile for every domain:

zone "domain1.com" {
  type primary;
  file "common.db";
};
zone "domain2.com" {
  type primary;
  file "common.db";
};
and so on.

Just make sure that all names in the zone files are relative (use @ to
refer to the domain itself).

If this isn't appropriate for you, perhaps you could write a simple script
that creates all the zone files and the named.conf file for you, from a
file containing a list of all the domains you're hosting.

-- 
Barry Margolin, barmar at bbnplanet.com
GTE Internetworking, Powered by BBN, 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