Simple DNS overview (if that's possible)

4 posts / 0 new
Last post
#1 Wed, 02/21/2007 - 00:13

Simple DNS overview (if that's possible)

I know DNS is complicated...are you able to help me understand the journey? My overall objective is to serve websites for,,,,, My understanding is this:

1- Domain name registered with registrar 2- Domain name delegated to Name Servers 3- Name server points domain to server with public IP 4- Server (with Virtualmin of course) serves pages with named based virtual hosts

Assuming that is correct, I'm ok with point 1 and 2. Re point 3...I've got an 'A' record pointing '' to my server's public IP, Virtualmin has setup a virtual server '' and all is sweet (I'm using to experiment). Next, using Virtualmin I create as a sub-server (I'm guessing I could create any kind of server with domain?). At the moment, I have to then go to the DNS hosting ( and create a sub-domain 'A' record that points to my server's public IP (along with www, ftp, mail variations). This works but....

What I want to do is be able to control all sub-domains of on my server with Virtualmin. Ie I want to point to my server but then have my server (Virtualmin) take care of all sub-domains / DNS.

Does that make sense?

Wed, 02/21/2007 - 15:51
Joe's picture

Howdy Jeremy,

<i>What I want to do is be able to control all sub-domains of on my server with Virtualmin. Ie I want to point to my server but then have my server (Virtualmin) take care of all sub-domains / DNS.

Does that make sense? </i>

Of course. That's what DNS is all about.

If you set your nameserver at your registrar to the address of your server (IP or name...some registrars have started making it very difficult to bootstrap a new domain for new users--they want you to enter a name and don't accept an IP to go with it, but if you don't already have working DNS service for another zone, you can't point things to the right place...quite annoying), your server will then be authoritative for that zone ( is the zone in your post also happens to be a domain name, but for DNS delegation purposes it is a zone).

You can further delegate zones to other name servers within your domain ( could be delegated to another server, which would be authoritative for,, etc.). But don't worry about that.

For you purposes, you simply want to set your registrar to list your server as the authoritative name server for your zone. Virtualmin takes care of the configuration on your server.

And yes, you can create any kind of website on It could be an alias, a forward, a sub-server of or some other virtual server or a standalone website. Names are just names. Virtualmin will get the right bits into the name server, so you don't need to think about the names at all...just create the servers in the way that makes them most useful to you and your users. If is administered by the same person as, just make it a sub-server owned by &quot;example&quot;. If a different person administers it, create a new virtual server with its own username and password and home.

And, if you happen to have access to another server, it can act as your secondary (if not, just give your primary box a second IP and use it for the secondary). Setting up a DNS slave is easy, and documented here:

If you want to understand more than just &quot;point your registrar to your Virtualmin server and let us do the rest&quot;, I'd suggest checking out the following docs:

There's a bit of a break down of how DNS works in my book, here:

And, if you still feel lost, I cannot recommend highly enough the book mentioned here:

It's among the finest of O'Reilly's books.

And, of course, feel free to ask for clarification if you don't understand anything I've just said. DNS can be confusing...there are so many terms that get misused (even by people who know me), it becomes difficult to keep up with who's talking to whom about what.


Check out the forum guidelines!

Wed, 02/21/2007 - 16:09

Thanks for all that info Joe - and for the speedy reply. You're filling me with confidence that Virtualmin is the right tool for our organisation!

I'll take a look at all that info and post again if I get stuck. Thanks.

Thu, 02/22/2007 - 01:08

ok...I read through all the docs you suggested and I've even ordered a couple of books. In the meantime.....

I've created and - still waiting for the change to make its way through the net. I pointed ns1 to my server's public IP, and ns2 to another server's public IP (I'll try getting the secondary stuff happening once the primary is working).

Now, the host name on my server is: When I create virtual servers in Virtualmin, it automatically assigns one nameserver to This needs to be changed to ns1.example does it not?

If this is correct, does this mean I should change the host name of the machine to

Virtualmin only creates one NS record for the Virtual server. Do I need to add a second - eg ?

I've wondered if I need to open a port for DNS to work (on both linux box and router)? Is this so? Do I need to open port 53?

Thanks Joe - looking forward to getting this part sorted - doing my head in!

Topic locked