Share this question

Welcome to Teachnovice Q&A, where you can ask questions and receive answers from other members of the community.

This is a collaboratively edited question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How can I manage all of my domains with only one configured zone?

0 like 0 dislike
70 views
I have one hundred or so domains. All of these domains need to be configured identically, but it seems like a huge waste of time to have to configure a new zone for every one of these domains. There has to be a better way to automate this!

I think I'm on to something...if I create a zone called ., or use some other feature in my DNS software to always return a specific IP when an A record is requested, this seems to get me pretty close to my desired end result. My server is responding authoritatively to the requests and it's so much easier to manage!

This was working great until nameserver validation software started checking these domains. I figured out that I can make most of the errors go away by adding NS records, but my software won't let me put more than one SOA record in the same zone file. How do I make this configuration work? I'm so close to having a fully featured solution!
asked Feb 19, 2015 by Andrew B  

1 Answer

0 like 0 dislike
 
Best answer

Short Answer

You can't do this. This seems like a good idea, but it's not, and you need to find a solution that doesn't involve breaking DNS to suit your needs.

Long Answer

We've been getting variants of this question several times in the past year.

The answer is pretty simple here: you can't do this. Any software that lets you define or otherwise synthesize multiple SOA records in this context is broken software, and doing broken things is not on topic for ServerFault. You either need to choose DNS software that makes this management simpler for you, or you need to come up with a different strategy that does not involve this particular shortcut.

There are definitely some tricks you can use to make life easier...using BIND as an example, it's fairly commonplace to define multiple zones that all reference the same template zone file. This is perfectly legal and validation software will find nothing wrong with it. Most people pass over this solution because it's still "too much work", because you still have to add a new zone definition every time.

Newer versions of BIND support an option called allow-new-zones that will let you dynamically create zone definitions on the fly via the new rndc addzone functionality. You might want to take a look at this and see if it fits your needs. Other than that, we're sorry, but we can't help you with a solution to this particular problem. Sometimes you just have to do things the hard way, even if it would be theoretically possible for the software to save you the trouble.

answered Feb 19, 2015 by Andrew B  
...