DNS Pattern : www.* www2.* www3.*

Joseph S D Yao jsdy at center.osis.gov
Fri Jan 6 17:53:26 UTC 2006


On Thu, Jan 05, 2006 at 03:04:23PM +0100, Sim wrote:
...
> I'm trying to create universal record with this pattern:
> www.*.domain.com: bad owner name (check-names)
...
> Is it possibile?
...


Not in this way.

If I had five domains such as kevin.example.com, mark.example.com,
paul.example.com, barry.example.com, and bob.example.com, then I could
do this in a file named "zone.common":

=======================================================================
$TTL 1d

@	SOA	wacky.example.com. hostmaster.example.com. ...
	NS	wacky.example.com.
	NS	doodle.example.com.

www	A	1.1.1.1
www2	A	1.1.1.2
www3	A	1.1.1.3
=======================================================================

and then define the zones as follows in "named.conf":

=======================================================================
zone "kevin.example.com"	{
	type master;
	file "zone.common";
};

zone "mark.example.com"	{
	type master;
	file "zone.common";
};

...
=======================================================================

On the other hand, if what you wanted was to have these as PART of zones
that otherwise have different information, you could just have the
following in a file, e.g., "names.common":

=======================================================================
www	A	1.1.1.1
www2	A	1.1.1.2
www3	A	1.1.1.3
=======================================================================

and then do a
	$INCLUDE "names.common"
in each of the relevant zone files.

Or, if you want all this in just one zone file, assuming that they were
subdomains of one domain, as in the first example, we could do this in
the zone file "zone.example.com":

=======================================================================
;; Starts with domain example.com-specific stuff.
;; ...

$ORIGIN kevin.example.com.
$INCLUDE "names.common"

$ORIGIN mark.example.com.
$INCLUDE "names.common"

$ORIGIN paul.example.com.
$INCLUDE "names.common"

$ORIGIN barry.example.com.
$INCLUDE "names.common"

$ORIGIN bob.example.com.
$INCLUDE "names.common"

$ORIGIN example.com.

;; Back to domain example.com-specific stuff.
...
=======================================================================

I hope that this helps.

-- 
Joe Yao
-----------------------------------------------------------------------
   This message is not an official statement of OSIS Center policies.



More information about the bind-users mailing list