How is my second name server accessed ?


I have registered many domains at and they use to manage the name server info.

I have been given two IP addesses by the company that
I have my dedicated server with.

So in I set up: --> -->

I am running Webmin and VirtualMin to manage my server.

All my websites (about 20) are hooked up to just one IP address, the
first one:

If only the first IP address refer to the machine that I leased, where does the refer to ?

How is "ns2" being used to benefit my server and the websites ?

Can I access this sub-doman ?
Is it a file or a directory ?

On the same subject:

Is itself a name server ?

How does it work with the BIND DNS on my rented server ?
Is my BIND DNS using both addresses on just the one that the virtual servers use ?

I hope someone can throgh some light on this subject.
Many thanks

Webmin and virtualmin works as administration interface for domains managed by them.

First of all you need to have glue DNS record to your primary domain.

For example will have two glue records for and - so the queries reaches right nameservers for your primary domain.

All domains created within virtualmin will have nameservers setuped due to your template settings. So probably all of your domains created in virtualmin will have and - if you have read through how to setup secondary DNS server (it is really simple task). And only what you have to do is to tell your domain registrator that domain which you are registrating has nameservers. Then all of DNS records will be handled by those two - and everything is under your control and control of virtualmin. is primary nameserver is secondary nameserver (backup one)

Is this explanation clear enough?

That explanation is not bad :wink:

Just to clarify:
Is the "glue" the nameserver record that is one the main account ?

eg if main account is
then the name server record will have:

name nameserver

Is that the glue ?

Then all the other virtual servers will just have one nameserver recored that will read: – >

Finally - you didn’t answer my question:

If only the first IP address refer to the machine that I leased, where does the refer to ?

Is it on the same machine?
or on another machine ?

Is "ns2.whatever" ( the secondary or back up) a file ?
Can I read it ?


your registrar tells the root servers in the world where to find your domain or nameservers.

on your box you will then handle all records for a domain. A records, MX records etc.

why 2, see answer in other thread.

the ns2 can be on the same box you have apache running, it can also be on a different box. Up to you, if you can afford it, put it on a different box, in a different location so it will have a different IP.

The second box will then have slave host files as the backup. It is not necessary if you have 1 machine with 20 domains.

You will find the ns2 line in the host file of the domain on your box.
it looks like this:

$ttl 10H
@ IN SOA (
10H ) IN NS 38400 IN NS
@ IN NS IN A IN A IN A IN A IN A IN A IN MX 5 IN MX 10 IN TXT "v=spf1 a mx ip4: ?all"

The ns record is not glue. The A record for the NS record is glue