Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a DNS server up and running with a zone configured for my domain with the allow-update directive enabled. I have the initial configuration for the domain in the file /var/cache/bind/ this file has a line with $INCLUDE directive to load records from this file.

The problem comes when I do an update of the zone using nsupdate because bind rewrites the file by deleting the $INCLUDE line and putting the content of directly in file.

How I can prevent this?

share|improve this question
up vote 1 down vote accepted

I don't think you can avoid that.

When you enable dynamic updates for a zone you are essentially handing the control of the zone file contents to bind; you are no longer allowed to make changes directly in the file and bind will need to rewrite it after updates.

As for $INCLUDE in that context, what would bind be expected to do if it were to keep the include statements?

Would it be expected to modify all of the referenced files as necessary when making updates?

What if some of include files are referenced from multiple zones?

What if you add a record for Bind would have no idea that the filenames mean something to you, it wouldn't know to add the entry in that file specifically.

If dynamic updates are not supposed to apply to that subdomain a better option may actually be to delegate and have that as a separate zone.

share|improve this answer
I solved the problem by using separate zones, one dynamic zone handled by bind and another static zone where i write manually the static entries. – Juan Apr 23 '14 at 13:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.