troubleshooting Question

How do I make BIND clean up after itself when a zone is removed from it via RNDC from a master server?

Avatar of Chad Killion
Chad Killion asked on
Linux* CentOSDNS
14 Comments1 Solution538 ViewsLast Modified:

I have a Master/Slave DNS setup using Bind9 and RNDC on Centos7.  It is working properly and zones are being replicated from the master server to the slave server when created.  When a zone is deleted from the master, the RNDC command deletes the zone from the .nzf file correctly, however the actual zone file containing the records is left on the slave servers forever.  Is there a way to make BIND clean up after itself for all discovered zone files which arent defined in slave .nzf file?  I should clarify that I don't have the option to edit the rndc commands which are fired from the master server as it is not in my control.  So maybe a script that would crawl the conf file daily and remove any zone files in /var/named/  which are not referenced in the .nzf file?

Chad Killion

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 14 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 14 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros