Importing webmin-managed DNS (only) for virtualmin management?

I have a client that I host about 100 DNS zones for. They have their own web servers (for the moment), but would like to manage DNS via virtualmin. I’ve been poking around in here, and it seems like the only way to do it is to batch create a bunch of virtualmin servers, and then copy the zone data one at a time into the “new” zones that get created.

I don’t suppose there’s a way to tell virtualmin to take the existing zones, assign virtual server id’s to them, and allow me to assign them to a user, is there?

Well here’s the catch - they’re going to be moving onto our system, just not yet. They’d like to start doing the domains on there first, and slowly move sites over one at a time. Hmm…I’ll see what I can come up with. The issue as I see it so far as importing goes is that it will mangle the existing A-records and CNAMES…maybe I’m wrong about that though. I’ll be testing it this afternoon.

Hey Tony,

I have no idea what you’re talking about, so here’s a picture of a bunny with a waffle on his head:

<img src="http://upload.wikimedia.org/wikipedia/commons/thumb/a/a0/Oolong_last_head_performance.jpg/601px-Oolong_last_head_performance.jpg" />

Seriously, I dunno if Virtualmin is gonna fit this task precisely, though we did do a requirements doc for someone that wanted to use Virtualmin just for DNS management a few years ago (when Virtualmin was yet a wee lad)…I seem to recall the actual code changes needed were small, but the actual implementation of getting the existing infrastructure tied into Virtualmin was going to be a bear. So…what can we do about that…

The low-hanging fruit is giving them a restricted Webmin account, which has access to all of those domains. You still get the GUI for the customer, a user account that you can restrict in whatever way you need, and the cluster slave feature (which, as you’ve noted is the damned sweetest thing to come to name server administration in years), and you don’t have to actually import anything (OK, you might have to copy the zone data over either via a slave zone update or just backup the records and copy the over). The down-side is that Webmin’s modules aren’t as well-designed for non-technical users as Virtualmin…but Virtualmin brings a lot of baggage that you don’t need for simple name service, and I don’t think disabling everything except name service will reduce the excess GUI elements as much as we’d like.

But to answer your specific question, there is a way to import data from stuff that already exists on the server, but I’m not sure if it’ll actually do anything without Apache VirtualHost sections for each zone. I might be wrong. We should try it and see, if you think Virtualmin would be more fun for your customer than the Webmin BIND module. :wink:

Seriously Toni,
I’ve sought the counsel of the waffle bunny myself. But you only gain knowledge by assuming the full Lotus postion while balancing a cup of Camomile tea on your left big toe.

What is the purpose of using VM? Are you eventually going to host each of the websites? VM won’t be eventually giving them each an individual webserver, perhaps you meant virtual servers? At any rate it looks like you’re describing that you currently want to be the primary nameserver while eventually adding one or two virtual servers at a time as their current hosting runs out? Your reference to hosting the DNS zones is what’s really confusing.

In a nut shell, it looks like what you really want is to admin the DNS zones through the Webmin BIND module, not VM. Then, when and if you host the actual virtual servers you would create them in VM which would take control, but the webmin BIND is still doing the work (if you will).

I love VM, but it’s really a sort of benevolent despot, telling everything else what to do and keeping a list to see who’s naughty and nice.

sorry Joe :wink:

And I’m sure I haven’t answered anyones question :slight_smile:

Dan

Oh, and to fix up that potention hot-button problem, go into installbase/etc/webmin/virtual-server/domains. There you will find the domain files by numeric ID. Simply identify the right files, and change dns=0, to dns=1. There, all done. Had you tried to do it from the GUI, it would have complained that webmin was already hosting this domain:

DEVS - if webmin is already hosting DNS, please add an option then that says "use existing zone or start a new one?". Kthx!

Just a side note - I was going to comment out this check and DNS write so I could do a batch import, but I can’t find it in domain_setup.cgi. It tosses setup_edns at from from the lang file, but other than in the lang file there’s not mention of setup_edns. ???

So yeah…it gets pulled from the ether. Go fig. :stuck_out_tongue:

Guess it’s a perl script hack for me today.

Aight, here we go…I have this working more or less…

To quickly answer the above question, they’ll get virtual servers, but just not yet. I’m creating an apache cluster, where all of the apache servers share a single config for redundancy and load balancing, but that’s a whole other story…

Anyway, here are the steps, VERY roughly as we go:

  1. Have Bind module writing to a file other than named.conf (for the sake of sanity, I have mine writing to virtualmin.conf). In named.conf, add the statement include "virtualmin.conf";

  2. Go to wherever you have your zone files currently located, and place them wherever you have your zones going. Again, for sanity I have mine in virtualmin-zones/ as to be separated from the original stuff.

  3. Import zone statements into virtualmin.conf, being careful to edit the statements so that they point to virtualmin-zones/, or wherever it should be pointed.

  4. Restart bind for good measure. Your zones should now appear to be listed. Do any cleaning up that needs to be done. Also test at this time that your slaves get the zones appropriately, if not, remove them from the cluster and re-add (NOTE TO DEVS - PLEASE ADD AN OPTION TO UPDATE TO BRING SLAVES INTO SYNC, thanks!). Again, verify everything is good.

  5. Back in the virtualmin module, create a virtual server for one of the above zones, but be careful NOT to check off “Setup DNS Zone?”. If you’re in my situation, you’ll also not check off “Create home directory” and “Setup website for domains?”, etc.

  6. Depending on whether or not this is an existing user, you may or may not want to create the administrator user.

  7. Look on in awe and amazement at the zones you imported earlier automagically appear in the administrator’s login. :slight_smile: Be careful not to check off that DNS Zone option however, as it will most likely try (and succeed?) to overwrite your stuff from earlier. Haven’t tested that bit yet though (I really should…that’s a problem just dying to come up, and I know it!).