Multi Server Setup help

15 posts / 0 new
Last post
#1 Sun, 09/13/2009 - 22:56
Tux.Ice

Multi Server Setup help

Hello,

Right now I have two virtualmin servers running (main1.mydomain.com and main2.mydomain.com) and a mail server running Zimbra on another server (mail1.mydomain.com).

So far, I've got both of them pointing mail to the mailserver, so thats good.

However, I would like to be able to use main1.mydomain.com as a nameserver, I think its called, so that I can point all my clients to that servers IP/FQDN and then that server decides if that clients website is on main1 or main2, and work accordingly (forward to server, or display website, or whatnot)

Can I do this ? Will it be better to purchase another server ? Can I keep main1 as a shared hosting server as well as a nameserver for both main1 and main2? Will I need to setup LDAP for this?

Thanks, Adam

Sun, 09/13/2009 - 23:16
andreychek

It sounds like you may want to setup the DNS server on main1 to be a "slave" of main2.

That would mean anytime you add a new Virtual Server to main2, it's IP address information would be submitted to main1 (while also existing on main2).

I've never attempted to setup a DNS slave out of a server that's also a master Virtualmin server for another set of domains, but it should certainly be possible.

Documentation on setting up a slave DNS server is here:

http://www.virtualmin.com/documentation/dns/slave-configuration

Sun, 09/13/2009 - 23:22
Tux.Ice

And this will allow clients on either server to enter main1.go-techo.com details as their nameserver, and have it work?

Sun, 09/13/2009 - 23:30
Tux.Ice

I want main1 to be the master server, so to speak. So that I can add an additional main3, main4, etc. and still have them all be accessible from main1 DNS.

My end goal is to work with the API so that new clients can register on my company homepage, and the best server is selected, an account is created via the API and then users can access their account by logging into webmin at main1.mydomain.com:10000 (no matter whether theyre on main1 or main2, etc.) and then set theyre nameserver to main1.mydomain.com (again, no matter what they're server is on) and have it all work. Can this be done?

Sun, 09/13/2009 - 23:36
andreychek

You should be able to setup the one server as a slave for multiple DNS servers.

This, in essence, can make this one DNS server the one place that knows the correct IP address for all your servers :-)

Although I haven't tried this setup before in Virtualmin, I'm not sure why it wouldn't work.

In order to allow your customers to enter "main1.go-techo.com" as the nameserver for their domain, you'd first need to register that name (and one other name, as you need at least two) with your registrar as an official nameserver.

-Eric

Sun, 09/13/2009 - 23:40
Tux.Ice

Ok, thanks!

Sun, 09/13/2009 - 23:51
andreychek

My end goal is to work with the API so that new clients can register on my company homepage, and the best server is selected, an account is created via the API and then users can access their account by logging into webmin at main1.mydomain.com:10000 (no matter whether theyre on main1 or main2, etc.) and then set theyre nameserver to main1.mydomain.com (again, no matter what they're server is on) and have it all work. Can this be done?

The setup you're describing is rather complex, and probably moreso than it needs to be :-)

Being able to use main1 as a nameserver is one thing -- that means it simply hands out the correct IP address. No problem.

But it sounds like you want your users to be able to log into main1, regardless of what server their account is on, yet still be able to manage their account information.

Is there any reason you wouldn't just want to have your users go to admin.theirdomain.com (an alias that's created for them by default) -- which would take them to Virtualmin on the correct server?

Regarding using the API to provision accounts -- you might consider the WHMCS product, it's setup to be able to do exactly that! You can download their 15 day trial to test it out. It's available at whmcs.com.

-Eric

Mon, 09/14/2009 - 12:13
Tux.Ice

That would be workable, however, for some reason, none of the subdomains setup work in virtualmin. I use the linode DNS manager, how can I forward domain DNS to virtualmin instead of using the linode manager?

Mon, 09/14/2009 - 12:19
Tux.Ice

My VPS is on a linode, how I have it setup is the following.

Domain forwards to linode DNS via the linode nameservers, Linode DNS then controls A and MX records, as well as subdomain control. I'm assuming I should just bypass the Linode DNS and direct the domain straight to virtualmin, correct?

Mon, 09/14/2009 - 12:19
andreychek

Well, that sounds like you're using Linode's DNS server's as the nameservers for the domains, rather than your own DNS servers.

That can only work if you somehow setup a method of submitting all new DNS entries to Linode's DNS servers (and I'm not sure if Linode allows for such a setup or not).

Typically, what you'd do is use your own servers as the nameservers -- but to do that, you need to first register them with your registrar as nameservers.

Once you do so, you can setup your own servers as nameservers for any domains you host. You'd do that in place of using Linode's DNS (or any other third party nameserver).

-Eric

Mon, 09/14/2009 - 12:20
Tux.Ice

My VPS is on a linode, how I have it setup is the following.

Domain forwards to linode DNS via the linode nameservers, Linode DNS then controls A and MX records, as well as subdomain control. I'm assuming I should just bypass the Linode DNS and direct the domain straight to virtualmin, correct?

Mon, 09/14/2009 - 12:21
Tux.Ice

So, I'm assuming I should register main1.go-techo.com as a nameserver, and set that to my nameserver for domain go-techo.com, correct?

But now, how would I go about adding DNS records from virtualmin? (Example, to redirect main1 and main2 to the proper server IP?)

Mon, 09/14/2009 - 12:29
andreychek

So, I'm assuming I should register main1.go-techo.com as a nameserver, and set that to my nameserver for domain go-techo.com, correct?

Yes, though I also mentioned this yesterday ;-)

"In order to allow your customers to enter "main1.go-techo.com" as the nameserver for their domain, you'd first need to register that name (and one other name, as you need at least two) with your registrar as an official nameserver."

But now, how would I go about adding DNS records from virtualmin? (Example, to redirect main1 and main2 to the proper server IP?)

Well, it sounds like you might just need to play around with this setup a bit to get a better idea of what all goes into this. And then if something isn't working, let us know what it is you're trying to do, and what isn't working about it :-)

If you setup main1 as your DNS server as outlined yesterday, as main2 submits the names/IP addresses to it, it'll be generating them with the correct IP.

However, in this setup, main1 isn't so much "redirecting" requests -- it's simply a DNS server, handing out the correct IP address as clients request it. In some cases, the IP address for a domain will be on main1, and on others, it'll be main2 (and later on, main3, main4, etc).

-Eric

Mon, 09/14/2009 - 16:51
Tux.Ice

So, main1 should be a slave, and main2, main3, main4 and so on should be masters?

Mon, 09/14/2009 - 17:31
andreychek

That's one of the ways of accomplishing the setup you were asking about, that's correct.

Using that setup, although main1 is the "slave" to multiple servers, you could still use it as the nameserver for those servers.

Again, I'm just trying to assist you in obtaining the setup you're after.

There's certainly multiple ways to architect this, and lots of folks have varying preferences in how to do this.

You'll also need a second nameserver. While you could just use a second IP on main1 for that, I might suggest using a different server to accomplish that. Personally, I'd probably suggest using whatever server your customer is on for the first nameserver, and main1 as the second -- but that's all up to you :-)

-Eric

Topic locked