Need help setting up named servers.

I’m not a complete newbie and have configured stand alone named servers before, but I need some clarification, especially with respect to Virtualmin and Webmin.

I’ve read the information under http://www.virtualmin.com/documentation/dns/ however I have some even more fundamental questions. I have a couple of VPS servers (different hosting companies) running Centos and Virtualmin. Let’s call them example1.com and example2.com. Example1.com also has sample1.com as a virtual host and example2.com has sample2.com. I think it’s a convention to name your dns servers as ns1.xxx, ns2.xxx, etc. Is that true or is it a requirement?

So what I want to do is let example1.com be the primary server for example2.com, example2.com being the secondary (slave???) and vice versa.

The first question is how to define ns1.example1.com. Should it be a subserver, a top-level server or an alias?

Once I have these defined then I assume I have to go to my registrars and mention ns1.example1.com and ns1.example2.com as servers for example2.com and vice versa, ns1.example2.com and ns1.example1.com for example1.com. Is that right so far?

Now when defining the A records or CNAME records I assume on exampl1.com I’ll have to add ns1.example1.com, along with the obligitory www, ftp, mail, etc.

I read about setting up the slave servers using webmin. Does that mean that ns1.example2.com is a slave server to ns1.example1.com? If so then do I need to also perform the same magic on ns1.example2.com making ns1.example1.com the slave of ns1.example2.com, or by becoming a slave will it mirror the other making further configuration unnecessary?

So finally is this the way I should be doing this or is there a better way? Or am I completely off base and need to go back to school?

Thanks,
Jim.

That’s a lot of questions. :slight_smile: Let’s see if I can shine some light on this stuff.

Naming your nameservers ns1.xxx, ns2.xxx and so on is merely a convention, not at all a requirement. But I’d suggest following the convention, just like websites usually have “www.” in front of their domain, though technically they don’t need to. :slight_smile:

It’s suggested to use a separate domain, which I tend to call “administrative domain”, for your servers’ hostnames, including “nsX”. E.g. my admin-domain is called “tianet.de”, my servers have hostnames with astronomical terms like “corona.tianet.de”, “pegasus.tianet.de” etc., and there’s also “ns1.tianet.de” and “ns2.tianet.de” which are additional names for two of those servers.

You wouldn’t make the admin-domain Virtualmin servers or sub-servers at all. There’s some problems involved when putting the domain which holds nameservers under Virtualmin control, so I suggest managing the admin-zone “manually” with Webmin’s BIND module.

At your registrar, you set up your administrative domain with “glue records”, i.e. telling which IPs belong to the nameservers. That’s required when the nameserver of a domain is a name in that domain itself (hen-egg-problem).

For all your hosted domains, you’d use “ns1.youradmindomain.com” and “ns2.youradmindomain.com” as nameservers at your registrar, and you don’t need glue there.

When you set up one nameserver - ns2 - to be slave of another (ns1 - via Webmin’s DNS Cluster Slave feature), that is one-directional. If you wish ns2 to also be master for some other zones, you’ll need to set up ns1 as slave for ns2 just the same you did before the other way round.

You don’t need to go back to school, you’re on the right track. :slight_smile: My suggestions with the admin-domain and how to name your servers up there aren’t strictly required, but they’ll make for a cleaner setup and your life easier. :slight_smile:

It's suggested to use a separate domain, which I tend to call "administrative domain", for your servers' hostnames, including "nsX". E.g. my admin-domain is called "tianet.de", my servers have hostnames with astronomical terms like "corona.tianet.de", "pegasus.tianet.de" etc., and there's also "ns1.tianet.de" and "ns2.tianet.de" which are additional names for two of those servers. You wouldn't make the admin-domain Virtualmin servers or sub-servers at all. There's some problems involved when putting the domain which holds nameservers under Virtualmin control, so I suggest managing the admin-zone "manually" with Webmin's BIND module. Sigh, That presents a problem. I'm already committed to having the, what you call "administrative domain", under Virtualmin control and since the domains are already well known, in some circles and probably linked multiple places I can't undo what I already have. For background one of these servers is a club site. It has three domains, the club domain and a couple of closely connected domains. The other server has a similar problem but I think I can decouple one of the domains from Virtualmin.

So if I go off and get another domain to use as a admin domain or decouple one from Virtualmin, can I put ns1.extra.com on same ip address as my first server and ns2.extra.com on the same ip address as my second server? By put I mean define them using Webmin’s BIND module? Extra.com is the one I decoupled (example only).

I think I’m beginning to understand. Also, I don’t really need to make ns2 a slave of ns1 and vice versa. Just make the one slave (ns2) and only make changes to ns1. Seems like it might be a problem to point both ways. :slight_smile:

Thanks,
Jim.

So if I go off and get another domain to use as a admin domain or decouple one from Virtualmin, can I put ns1.extra.com on same ip address as my first server

Yep, you can do that, and it’s actually the recommended way. :slight_smile: It’s not necessary, but makes things tidier and better to manage when you have a separate (in your case new) domain to give your servers names from. You can have as many names point to one IP address as you wish. And yep, you can manage that zone through Webmin.

Also, I don’t really need to make ns2 a slave of ns1 and vice versa. Just make the one slave (ns2) and only make changes to ns1. Seems like it might be a problem to point both ways. :slight_smile:

Well, it’s not a problem per se, I used such a setup for quite a while. I have two physical servers with VMware ESXi on it, and one Virtualmin webhosting VM on each physical machine. For quite a while I had them set up to be mutual DNS slaves of each other, to provide secondary name server for the zones of the other server’s domains. So, if you need to want that setup solely depends on whether you have Virtualmin servers on both your machines or not.

As a reminder: Virtualmin expects the master nameserver to be on the exact server where you create the domain, i.e. it will configure BIND on that exact server to manage the zone. The slaves can be anywhere.

Thanks for all the info. You’ve been a great help. I suspect your responses will also help others in the future.

Jim.

Hi,

At TPN Solutions, years of industry experience have taught us a lot about naming servers, and the like.

Like Locutus pointed out, while it’s not absolutely required to have an “administrative domain”, it does make things cleaner, and easier to manage things.

In our setup, we take things to the extreme, perhaps a bit overkill but it’s by design for the long term.

tpndns.com: this domain is exclusively used for our DNS needs. our network is designed with two nameservers for the moment (ns1.tpndns.com, and ns2.tpndns.com) but this number is easy to grow in the future if needed. Further as recommended, each of our nameservers reside in different geographical regions for true redundancy (which is the purpose of having two nameservers).

tpnservers.com: this domain is exclusively used for naming each of our servers (including our DNS cluster). after a number of years using planetary and astrological names, we’ve recently switched to “roll-based” names (dns1.tpnservers.com, sql1.tpnservers.com, web1.tpnservers.com)

Just my two cents on the topic :slight_smile:

-Peter