Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use same zonefile for two different domains?

Status
Not open for further replies.

ocoro02

IS-IT--Management
Feb 6, 2008
5
I've inherited a pretty broken dns setup ... In order to make my life easier before I make big changes and fix it for good I'd like to do the following:

I have two domains. I want to be able to use the same zonefile for both domains. To make matters more interesting, the zonefile I wish to use is transferred to my bind 9.2.x installation from a Microsoft DNS server! This has the zone name in the header -

$ORIGIN .
$TTL 3600 ; 1 hour
mydomain IN SOA myserver.mydomain. hostmaster.local.mydomain. (
...

Is there any way I can refer to this zonefile from another domain entry in named.conf? I thought of zone delegation but not quite sure if this is possible here.
 
I did this all the time when hosting a gazillion domains.

You can't use the $ORIGIN directive (because that sets the default domain). I don't think it is required (at least in Bind 8).

So now to refer to the domain you would use @:

; $ORIGIN . < don't need

$TTL 3600 ; 1 hour
@ IN SOA myserver.mydomain. hostmaster.local.mydomain. (
...

What to watch out for is CNAMES, because CNAMES cannot point to CNAMES.

eugene

 
Ah - I thought this could be done. The snag is I'm tied to the format of the zonefile passed to me by the Microsoft DNS server which has the domain & $ORIGIN hard coded in. I think this is a case of me looking at a problem the wrong way so I think I'll see what else can be done. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top