Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 04-03-2008, 04:38 PM   #1
Registered: Sep 2005
Posts: 65

Rep: Reputation: 15
shared zone file in bind9


Suppose I have an internal domain called "company.local". The zone file contains entries for A records www,ftp,host1,host2,...etc...

Is there a way to have a second domain, say , "companydomain2.local" who reads his records from the same file?

The idea is not to have to mantain two zone files with the same records.

Thanks a lot for your help.
Old 04-03-2008, 08:29 PM   #2
Senior Member
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
I don't think it will run cleanly and happily with the same exact file, as things like the SOA (start of authority) will need to have company.local in the company.local zone, and company2.local in that zone.

What you could do however if all the zone info is the same, is just to use a script to cut all the data past the start of authority from company.local, and dump it into company2.local.

That should allow you to only maintain company.local, and company2.local will just exist as a quasi-copy. just make sure you run the script to update company2.local anytime you make a change to company.local.

Old 04-04-2008, 09:02 AM   #3
Registered: Sep 2005
Posts: 65

Original Poster
Rep: Reputation: 15
Finally I've managed to solve the problem by using the $INCLUDE directive. I've the two zone file but instead of having RRs they have in their place an $INCLUDE "records.txt", so, the RRs are not duplicated as I was looking for.

Thanks a lot.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
error while loading shared libraries: cannot open shared object file: Franziss Linux - Newbie 10 06-28-2010 05:47 AM
deleted master dns zone and messed bind9 up :\ steve51184 Linux - Server 23 03-24-2008 06:07 AM
How to share a ZFS file system between a global zone and a non global zone? crisostomo_enrico Solaris / OpenSolaris 7 11-28-2007 08:20 AM
DNS Zone x-fer - From one zone to another / Debian 3.1 + BIND9 kenwoodgt Linux - Software 0 11-01-2006 10:28 AM
(Bind9) New Zone icon not visible in Webmin Akhran Ubuntu 0 01-29-2006 12:28 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:21 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration