Nameservers and creating new virtual servers

I am quite confused about setting up dns for servers under virtualmin. The more I read the more confused I get.

Prior to even installing virtualmin, I was only running webmin and I thought I had to create a new master zone for a domain and I would in fact create a nameserver.

Then I stumbled across virtualmin and it seems to setup dns zones automatically for virtual servers.

My question is, do I not need the master zone I created in webmin…ie should I delete it. When I create a new virtual server through virtualmin then a dnszone and records will be created automatically. When these are created, are nameservers created as well…does each site now have its own nameserver. I do see a nameserver record being created with a name server of localhost.localdomain. and zone name of example.com (for example).

Do I first have to pick one of the domains I am to host, and create nameservers based on it. This nameserver would then be what I enter at the registrar for all my domains to be run through virtualmin. Then for other domains do I use that domains nameserver as the master server for other domains.

One other thing…do I have to manage DNS through virtualmin or can I manage elsewhere at some other dns service (since I only have one static IP anyway). Would I set up all dns zones and just point them to my static ip. How would virtualmin handle this since it sets up dns zones automatically?

Howdy,

Virtualmin does indeed create zone files for each domain containing a number of DNS records.

Exactly which records it creates can be modified by looking in System Settings -> Server Templates -> Default -> BIND DNS Domain.

To be a nameserver though – as you mentioned – you’d need to set things up as such.

First, you’d have to setup DNS records for ns1.YOURDOMAIN.com and ns2.YOURDOMAIN.com on your server.

Then, you’d go to your registrar, and register the so-called “Glue Records”. Before any domain can be told to use any given nameserver, you have to register the namserver names (ns1 and ns2 in this instance).

On GoDaddy, for example, you’d log in, go to the details for your domain, and at the bottom-left you’ll see “Host Summary”. That’s where’d register ns1 and ns2 and their associated IP address. This is the “glue record”.

Once you’ve registered these names as being legitimate nameservers, you can then point the nameservers for any given domain at them, and your server becomes their nameserver.

Before doing that, you’d want to make sure your server has all the DNS records setup!

To answer your last question – you certainly don’t have to use Virtualmin to manage your DNS. But once you get things up and running, you might find it much easier as it does a lot for you.
-Eric

To add to Eric’s excellent commentary, we have quite a lot of documentation about DNS:

http://www.virtualmin.com/documentation/id,dns_slave_auto-configuration_quickstart/

http://doxfer.com/Webmin/BINDDNSServer

http://www.virtualmin.com/documentation/id,dns_troubleshooting/