Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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/db.mydomain.com this file has a line with $INCLUDE db.aux.mydomain.com 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 db.mydomain.com by deleting the $INCLUDE line and putting the content of db.aux.mydomain.com directly in db.mydomain.com file.

How I can prevent this?

share|improve this question

1 Answer 1

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 foo.aux.mydomain.com? 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 at 13:24

Your Answer

 
discard

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.