DNS bug for alias servers?

Alias servers does not reflect fully the configuration from parent virtual server.

I’ve noticed that the secondary server (allow-transfer) is not propagated.

This is the configuration generated from virtualmin (virtual.it is the virtual server, and alias.it is the alias one)

zone “virtual.it” {
type master;
file “/var/lib/bind/alias.it.hosts”;
allow-transfer {
127.0.0.1;
localnets;
213.251.188.141;
};
};
zone “alias.it” {
type master;
file “/var/lib/bind/alias.it.hosts”;
allow-transfer {
127.0.0.1;
localnets;
};
};

I’ve edited the template to redo the configuration from scratch, even for alias servers.

Without having double-checked this myself, it does sound like a bug. Eric might want to forward this to the Vmin team.

Is “213.251.188.141” a configured slave nameserver for those domains? I.e. does any of the NS records in the zone resolve to that IP?

In that case, you’re good to go despite the bug, because in BIND, slave nameservers are always allowed to do zone transfers, even without an explicit allow-transfer directive.

UPDATE: How exactly did you expect the allow-transfer to propagate to the alias domain? I think Virtualmin will by design not just copy the contents of allow-transfer directives of the parent, but use the assigned server template and whatever is configured there for those directives.

I’ve attached two screenshot: the master server options and the alias ones (from templates).
It’s possible to note that the alias template inherit all options from the master one, but writing the zone virtualmin forgot the allow-transfer for the secondary server.

I don’t use the “Default settings” template: I’ve created another template that I made “default” for top servers. And alias servers are alias for virtual servers using my own template.

Please even note that the dns domain is created fine from my own template in alias servers: it’s just missing the allow-transfer for the secondary dns.

Your post contained only one screenshot, but if I’m getting this correctly:

You have the template for your parent domain set so that the allow-transfer directive gets added, and the template for the alias domain to use the defaults there?

Okay, please note that “from default settings” in your alias template does not refer to the directives that were put into the parent domain, but to whatever you configured in the “Default Settings” template. :slight_smile: If you didn’t configure that, it’s to be expected that allow-transfer is missing.

I cannot add the second screenshot :frowning:
I’m receiving the error:

“An HTTP error 0 occurred.
/comment-upload/js”

Anyway, when adding an alias server, the domain is configured as the same for the parent domain: infact, I’ve just tried, if you make an alias server, the dns zone is made the same (without, of course, the domain) as the parent domain.

So, I expect that even DNS options are copied: I mean, it makes no-sense to make some stuff as the parent domain and some other stuff not.

Finally, I think the interface it’s not clear: as I already stated, I made another template the “default template”. If I read “from default settings” I think that default settings are what I’d like to be the default settings.

And what would you “like to be the default settings”? There’s no way to manually define a template as the “default” in Virtualmin, but the one named “Default Settings” is by design the one that other templates refer to when you choose “from default”. :slight_smile:

As for expecting the DNS settings to be copied as opposed to being taken from the template: Well, I guess it’s a matter of taste. Design decisions like this are probably best answered by Eric or Jamie. :slight_smile:

You can set the default template in the template you choose by enabling “Initially selected template for top-level servers?”.

OK, understand :slight_smile:

So I think it will be a lot useful to enable something like “From parent settings”, so you can have more choices to have a child-parent way to propagate stuff.

BTW, it really make no-sense the way virtualmin threat dns stuff for alias servers :frowning:

Yes, I have to agree that the template relationship stuff is a bit limited. Maybe sometime, when the developers get around to it, they could expand a little on that. It’d not be a trivial thing to implement though.

If you feel that the alias server DNS thing should be changed, it’d be best to open up a feature request in the issue tracker. While the tracker is primarily for Virtualmin Pro customers, the developers are happy about bug reports and feature suggestions from GPL users as well! :slight_smile:

I’ll do immediately!
Thanks a lot, Locutus! :slight_smile:

Not exactly. :slight_smile: That setting doesn’t configure the default template, but merely chooses which one is pre-selected in template selection dropdown boxes.