LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   shared zone file in bind9 (https://www.linuxquestions.org/questions/linux-server-73/shared-zone-file-in-bind9-632807/)

matiasquestions 04-03-2008 04:38 PM

shared zone file in bind9
 
Hi.

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.

JimBass 04-03-2008 08:29 PM

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.

Peace,
JimBass

matiasquestions 04-04-2008 09:02 AM

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.


All times are GMT -5. The time now is 12:38 AM.