[Gllug] speaking of DNS server setups...

Richard Jones rich at annexia.org
Tue Jan 4 16:40:56 UTC 2005


On Tue, Jan 04, 2005 at 03:46:25PM +0000, Benedikt Heinen wrote:
> 
> Is it possible, with bind9 or another name server, to specify part of a 
> domain name as a wildcard?

Very much so:

  http://wwwwww.merjis.com/
  http://wwwwwwww.merjis.com/
  http://wwwwwwwwww.merjis.com/

Just put a "*" record in your zone file:

  *       IN      A               80.68.90.205

Note that some people consider wildcard MX to be evil.

> e.g.  I would like to define the same setup for all *.foo.net hosts, so 
> that www.a.foo.net, www.b.foo.net, ... www.zyx-cba.foo.net all point to 
> the same host?

You'll need to configure Apache so it knows about the different domain
names, of course.  In our case we use a rewrite rule to push all the
unknown domains to our main virtual host:

  RewriteCond %{HTTP_HOST} !^merjis.com$
  RewriteRule (.*) http://merjis.com$1 [R=permanent,L]

> Second, and now it gets more interesting, can I specify exceptions?

I think so.  IIRC you have to put the exception cases before the final
"*" record in the zone file.  I'm about 90% sure we used to do this,
but since then we've consolidated to a single IP address, so I can't
locate an actual case where we're doing this right now.

> Finally, and now we're leaving bind's domain - can I set up postfix in a 
> way to allow to receive email for all those, without adding all 
> individual names to the mydestination and/or relay_domains list?

No idea about postfix, but I'd be surprised if it wasn't possible.
It's certainly something which is easily done in exim.

ObUselessGadget:

http://gadgets.engadget.com/entry/7718250837182359

Rich.

-- 
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list