Primary and secondary name server on single server

Trying to simplify my life by hosting our own name servers instead of having to modify zone files to point to our ip addresses by hand all the time :slight_smile: However, we have just a single computer. We do have multiple ip addresses available to us.

How do I do this in virtualmin/webmin?



Not sure what you mean, but Virtualmin does this already out of the box (check also the BIND/dns in the Virtualmin documentation

Basically you just need to switch the DNS entries with your domain registrar. Since you only have one server, you would only need one name server.


Yup, helpmin is correct, the entry “How do I setup nameservers for my server” here in the DNS documentation should help you get that all sorted out:


Thanks! The FAQ was exactly what I needed. I don’t know why I can never find anything on the virtualmin website. I’m no google noob, but for some reason finding the right info on continues to evade me.

This is the useful, relevant bit:

After registering your nameservers at your domain name registrar – you’ll want to log into Virtualmin, select your “” domain, click Server Configuration -> DNS Records, and create a new “A - IPv4 Address” record for and

Now I just need to update all the name server records. Should have worked this out at the beginning :slight_smile:

Thanks again

You should add to the FAQ that port 53 (TCP & UDP evidently) must be open in your firewall if you want the outside world to be able to query your name server!

Here is how I found the documentation.

  • Looked for documentation link in the menu.
  • CTRL-F (find) DNS

That was all :wink:

Regarding firewall. not sure whether this is a frequently asked question?

Most people would just configure iptables with the open ports typically used for hosting option in webmin (or so). That should take care of it (and many other ports required as well).