New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force regeneration of configs and zone files #43

Closed
bagintz opened this Issue Nov 20, 2013 · 5 comments

Comments

Projects
None yet
2 participants
@bagintz

bagintz commented Nov 20, 2013

Looking in my /etc/bind directory, I see a bunch of (I think) conflicting files that are producing unwanted results. I think there are leftover files from previous releases of fmDNS (i.e. named.keys.conf, as opposed to the newer named.conf.keys).

I also created an Internal view (matched clients from internal network) and External view (matched any clients), and when I go into my zone directory, I see 3 different zone files for domain.tld, instead of 2. I am confused as how the views works through here.

I basically want to have some different zone file entries for domain.tld if the request comes from 192.168.1.0/24. Maybe I am doing it wrong.

@WillyXJ

This comment has been minimized.

Owner

WillyXJ commented Nov 20, 2013

There's actually commented code in client/facileManager/fmDNS/functions.php that addresses this:

    /** Remove previous files so there are no stale files */

// foreach (scandir($server_zones_dir) as $item) {
// if ($item == '.' || $item == '..') continue;
// unlink($server_zones_dir . DIRECTORY_SEPARATOR . $item);
// }

It was commented out to revisit later as there were potential problems with it. Perhaps now is a good time to revisit it. :)

I might implement a new option to use with dns.php on the CLI to force a rebuild after deleting all files.

You are using fmDNS correctly to achieve your desired results. When you have one zone per view (in this case your UI should show you have two zones named 'domain.tld' each associated with a different view) then the client files will build two zone files - one per view. So, you should have db.domain.tld.<zone_id>.hosts.

What are the filenames of your three copies of domain.tld?

Another thing to note is only the files listed in the preview will be loaded by named so having old files that aren't loaded wouldn't impact your named configuration.

Feel free to email me directly (jon [at] facilemanager dot com) if you'd like me to review your issue outside of git.

WillyXJ pushed a commit that referenced this issue Nov 20, 2013

@WillyXJ

This comment has been minimized.

Owner

WillyXJ commented Nov 20, 2013

I was able to reproduce the issue where named.conf.local and named.conf.options were not being created on Debian-based systems thus causing unexpected results from named.

Would you be able to manually apply the changes in d61c61b to your fM server to verify this has resolved your issue? If so, I'll ensure it gets included in the next release.

@bagintz

This comment has been minimized.

bagintz commented Nov 20, 2013

I will give it a shot, thank you.

On Wed, Nov 20, 2013 at 4:03 PM, WillyXJ notifications@github.com wrote:

I was able to reproduce the issue where named.conf.local and
named.conf.options were not being created on Debian-based systems thus
causing unexpected results from named.

Would you be able to manually apply the changes in d61c61bhttps://github.com/WillyXJ/facileManager/commit/d61c61bto your fM server to verify this has resolved your issue? If so, I'll
ensure it gets included in the next release.


Reply to this email directly or view it on GitHubhttps://github.com//issues/43#issuecomment-28930740
.

WillyXJ pushed a commit that referenced this issue Nov 21, 2013

@WillyXJ

This comment has been minimized.

Owner

WillyXJ commented Nov 21, 2013

Added an option to purge files prior to writing/updating them. This will be included in the next release.

@bagintz

This comment has been minimized.

bagintz commented Nov 21, 2013

Thanks

On Thu, Nov 21, 2013 at 12:15 PM, WillyXJ notifications@github.com wrote:

Added an option to purge files prior to writing/updating them. This will
be included in the next release.


Reply to this email directly or view it on GitHubhttps://github.com//issues/43#issuecomment-29003305
.

@WillyXJ WillyXJ closed this Dec 4, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment