Test environment: local subnet DNS server + domain name registration?

I have successfully set up a name server for a local subnet, and want to configure it as a Virtualmin testing server so that when I create virtual servers on it, it assigns to that server a domain name that’s a subdomain of the local domain. The DNS server and the Virtualmin server are one and the same. I’m merely trying to make it so that Virtualmin adds entries to the zone file for the local network. Is this possible?

The domain name registrar seems geared solely towards domain name registration with paid services residing out on the web. Is there a way around this? How might I go about setting up such a testing environment where I can use local DNS to test the creation of virtual hosts?

I have already read this:
It is totally overkill. I am not trying to set up slave zones for each and every VPS. I also tried:
It too seems geared towards connecting to paid services. Again, all I want is to add a virtual server with a host name in the local zone. Every time I try to create a virtual server, it adds a zone entry to /etc/named.conf, and this is not necessary. Furthermore, named fails to properly chroot, and the paths to the “..net.hosts” files are incorrect.

I hope I’m getting your problem correctly. :slight_smile: Two hints: If you don’t need your virtual servers to be reachable from the Internet, as in have an externally resolvable domain name, you can add the domain names you do use to the “hosts” file on your testing machines, and resolution will work. Alternatively you can add the IP of your Virtualmin host to the nameservers to be queried by your LAN machines, which will also make resolution work.

As for the creation of new zones for all servers, there’s a switch in the config to change that behavior. Take a peek at the Server Templates, section BIND DNS Domain, entry “Add sub-domain DNS records to parent domain?”.

If that doesn’t help, I’d like to ask you to re-phrase what problems exactly you’re having at the moment.

After reading your response I was going to try those things, but a few unrelated issues came up with BIND on the test machine (CentOS). At any rate, thank you, and I’ll be trying them again shortly.

Edit: after much frustration and confusion (i.e. in how Virtualmin runs named in the chrooted environment versus how the OS would normally run it) I’ve decided to give up and manually edit my hosts file (for the time being). For what it’s worth, thank you for your help.

If it’s still of interest: what problems exactly did you run into? The Virtualmin BIND runs fine on my Ubuntu…

Hi,we are now doing a project for top-level domain name registration service,but since we haven’t got an account with Versign,we do not have the testing environment.Now I need to create a testing environment,what should I do? Please give me some help.Thanks.