[ale] DNS Server Config for Two Domain Names?

Matt Smith msmith at risklabs.com
Tue Jul 16 18:28:39 EDT 2002


Yes it will work in either version, other than the syntax of the config
file.  I forget when they went from the named.boot to the named.conf, when
the changed the syntax slightly, but the general technique will work in
either.


--Matt


-----Original Message-----
From: Ryan Neily [mailto:ryan at neily.net]
To: ale at ale.org
Sent: Tuesday, July 16, 2002 6:11 PM
To: Matt Smith
Cc: ale at ale.org
Subject: RE: [ale] DNS Server Config for Two Domain Names?



Matt, 

Thanks for the reply, this is EXACTLY what I was looking for.  I found 
lots of ways to do it with multiple zone files as well as playing tricks 
with CNAME/DNAME combinations, but not an easy short way using one zone 
file. 

I am assuming this is ok for BIND 8.x and 9.x?

On Tue, 16 Jul 2002, Matt Smith wrote:

> If in the zone file, you use @ at the top, rather than a domain name, you
> can reference the zone file twice in your named.conf file for two
different
> domains and the two domains will be identical.
> 
> Here's an example (Private IP's used):
> 
> Named.conf snippet.
> 
> 
> zone "ryan.com" in {
>         type master;
>         file "myhosts";
> };
> 
> zone "neily.com" in {
>         type master;
>         file "myhosts";
> };
> 
> ---------------------------------------
> Here's what myhosts needs to look like:
> 
> $TTL 3600
> @            IN   SOA     dns  mailhost. (
>                           2001071901            ; Serial
>                           10800                 ; Refresh
>                           1800                  ; Retry
>                           3600000               ; Expire
>                           259200 )              ; Minimum
> 
>                         MX      10 10.1.1.1
>                         NS      10.1.1.1
>                         A       10.1.1.1
> 
> www                     A       10.1.1.1
> mail                    A       10.1.1.1
> localhost    IN   A       127.1 ; note that 127.1 is the same as
127.0.0.1;
> see inet(3n)
> 
> --------------------------------------
> 
> That should work.  Now you'll have www, mail, etc for both domains...  I
may
> have a syntax error somewhere, but I'm sure bind will tell you where. :)
> 
> 
> --Matt
> 
> 
> -----Original Message-----
> From: Ryan Neily [mailto:ryan at neily.net]
> Sent: Monday, July 15, 2002 4:49 PM
> To: ale at ale.org
> Subject: [ale] DNS Server Config for Two Domain Names?
> 
> 
> 
> Are there any DNS/BIND freaks out there that can answer this question?
> 
> I am looking to change an authoritative DNS server (Bind 9.21) so that it 
> it will resolve for two domains at the same time.  What I am looking to 
> do is have a domain (for example ryan.com) and another domain (for 
> example neily.com) resolve for the same hosts. (Meaning hostx.ryan.com and

> hostx.neily.com will resolve to the same IP address)  I know that I can 
> make duplicate copies of the data and reverse files, but then when 
> updating, I will have to make changes in two places...
> 
> Is there any way to do like an "alias" in BIND 9.21?  It seems like this 
> would be common knowledge as many companies own multiple domains. 
> 
> Any ideas?
> 
> 

-- 
Ryan Neily
ryan at neily.net


----- 
Confidential Information 

The information in this e-mail message (including any attachments) is
privileged and confidential information intended only for the use of the
individual or entity named above.  If the reader of this message is not the
intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this communication is strictly prohibited.

---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list