DNS & sub domains

Hi all! I installed Virtualmin 3.69 gpl with the install.sh script and its running fine. Thanks a lot for that nice and powerful tool and the easy to use installation script! I created some (top-level) virtual servers like mydomain.de , sub1.mydomain.de, sub2.mydomain.de,… .
The domains are registered at an other company, so I pointed A records to one of my two IPs of my server using the name servers of the other company. Same I did for the sub domains sub1.mydomain.de, … Everything seems to run fine. Now I would like to be able to create sub domains using Virtualmin but without the need to add A records at the other company for each virtual server (sub domain). Is it possible to setup something like that with Virtualmin? After reading in the forum and documentation it sounds like the way is to use two own nameservers on the two IPs. Because I’m new to DNS, I would appreciate any help/information on how to do that! Please tell me if more detailed information about my server config is needed!


Yup, that’s all you need to do is use your server as a nameserver.

What I’d do is:

  1. Choose mydomain.com from the dropdown in Virtualmin, and choose Services -> DNS Domain, and add an “A” (or “Address”) record for ns1.mydomain.com and ns2.mydomain.com.

  2. Go to your domain name registrar where mydomain.com is located, and register ns1 and ns2 that you setup above as nameservers. This isn’t just changing the nameservers for mydomain.com (we’ll do that in a moment), your registrar should have a place where you formally register your IP’s as nameservers.

  3. Once you’ve registered your IP’s as nameservers, you can go ahead and change the nameseervers of mydomain.com to use ns1.mydomain.com and ns2.mydomain.com.

Somewhere along the way, you’ll want to verify that BIND is listening on an external facing IP address, and that it’s accessible to folks on the Net.

Thanks a lot Eric, for your instant, detailled and really helpful guide!! Now everything is working like I want. :slight_smile:

I just had some small hassles because of the denic (tld .de) requirement, that the two nameservers have to be in different sub nets, but found a way around…