DNS: Transfer "Client Views" to slaves?!

Hey guys,

Is it possible to also transfer the "Client Views" from the master to the slave? The zones are getting transfered succesfully but those who are in a view end up w/o the assigned view which of course results in an error: Warning - the following zones are not in any view : example.com BIND may not be able to start until they are moved to a view.

Also, is there a way to "force" the retransfer of the zones?

Thank you and kind regards.

Status: 
Active

Comments

There is no automatic transfer of views unfortunately - you need to first setup the same views on the slave, and Virtualmin will copy zones into the view with the same name in future.

If you don't have too many views, a quick fix would be to just create the views on the slaves and then move the existing zones into them.

Thank you for your answer!

Apperantly, you're right. I've just 5-6 views. My problem is, that I need to add every domain to every view.

I guess, the easiest solution would be the possibility to copy zones to views (instead of moving them). Would it be possible to implement this feature?

I've already tried to change the move_zone.cgi - unfortunately, Perl isn't my language so I would probably mess things up.

However as far as I can tell the solution would be something like: copy zone, add name of the new view into the filename, save_directive.

Thank you and regards.

So each of your zones is in multiple views? Unfortunately Virtualmin doesn't support that currently ..

Wouldn't it make more sense to instead create a view that matches all clients (or all the clients you other views match combined), and just put the domains into this one?

Well, I'm using these views to make my BIND geo-aware. I.e. I have the view US and EU. If a client makes a query, BIND checks the IP, extracts the country with GeoIP and uses the appropriate view. In each view are different IPs assigned for the domains.

That's the reason why I need this feature. I'm fine with editing the zones afterwards or maybe I can use templates, but copying every zone and editing the view is a bit annoying.

I'm not sure if this behaviour could be achieved with a single view. I've already manged the proper slave-transfers with acl's and keys, but putting each zone in every view is still making me headache.

However, if this feature isn't worth to implement, I'll try to do it by myself and submit a patch if I'm succesfull. ;)

Thanks and regards.

Ok, I see now .. so your domain names are the same, but the contents are different.

Currently Virtualmin doesn't have any support for this kind of configuration. In fact, you might be better off not enabling the DNS feature in your Virtualmin domains at all, and instead setting them up manually .. it would reduce the chance of Virtualmin making un-expected changes to your DNS records.