• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Secondary nameserver manual setup

MarkBKK

New Pleskian
I would like to *manually* set up separate primary and secondary nameservers. I have two servers in two different locations (actually, two different countries), both running Plesk on Linux. I don't want to use any master/slave configuration between the two.

Never mind the cost of having two servers, just assume the business goes thru so much money that the server cost is not on the radar, but any server downtime could cause serious loss of business income as well as lots of idle staff on the payroll and overhead costs.

I believe that this is a question that many people should have, yet when I search the web, I find only complicated techie answers and jargon when in fact I believe that I have a simple solution.

Like many guys here, I don't know enough about scripts to do master/slave. I can barely get by on SSH. I would rather do *everything* in the Plesk control panel, but see the results, not leave it to faith that some "Service Mode" or cron job will work later, or maybe make a problem into a bigger problem automatically. (I also know how control panels can trash configurations edited at the SSH level.)

I have only a few domains running on the servers (just a few businesses!), so manual editing is not much work.

So here is my setup, with fictitious domain names as examples:

Box 1 set up with nameservers ns1.obama.com and ns2.obama.com and IPs 111.111.111.101 and 111.111.111.102

Box 2 set up with nameservers ns1.mccain.com and ns2.mccain.com and IPs 222.222.222.201 and 222.222.222.202

My business has a website www.president.com which has this domain set up at the registrar with two nameservers split between the two boxes, ns1.obama.com and ns1.mccain.com

The shared IP of the website on the obama.com server is 31.31.31.31

I upload my website to both servers but it is active only on the obama.com server, and it serves my mail there. No website traffic goes to the secondary server, but everything is loaded in case the primary server goes down and we must make a manual switch.

So I also have the website on the shared IP of the mccain.com server at 32.32.32.32 but expect no traffic.

On the obama.com server, I have this

president.com. A 31.31.31.31
president.com. NS ns1.obama.com.
president.com. NS ns2.obama.com.
president.com. NS ns1.mccain.com.
president.com. NS ns2.mccain.com.
president.com. MX (5) mail.president.com.
mail.president.com. A 31.31.31.31
webmail.president.com. A 31.31.31.31
www.president.com. CNAME president.com.
ftp.president.com. CNAME president.com.
backup.president.com. A 32.32.32.32

On the mccain.com server, I have the identical information:

president.com. A 31.31.31.31
president.com. NS ns1.obama.com.
president.com. NS ns2.obama.com.
president.com. NS ns1.mccain.com.
president.com. NS ns2.mccain.com.
president.com. MX (5) mail.president.com.
mail.president.com. A 31.31.31.31
webmail.president.com. A 31.31.31.31
www.president.com. CNAME president.com.
ftp.president.com. CNAME president.com.
backup.president.com. A 32.32.32.32

(The backup.president.com is to test to make sure the backup website works fully.)

If one server or nameserver goes down, I can just log into the second Plesk server and change all the 31* addresses to 32* addresses and I'm still in business.

Am I right or wrong?

Is this going to break anything, in principle? Is the secondary nameserver *required* to become a slave? Or can I just do it all manually, being careful to keep everything identical between the two servers?

Also, is there any risk to my current Google ranking by switching to this method, all else the same?

The above is theory.

In reality, right now, my situation is that everything is on one server, obama.com , but I already have a second server used for other business, and I am thinking of using this second server as a backup nameserver (and server!) in case the first server ever goes down.

Actually, the full story is that I already have serious problems:

My president.com domain and about a dozen other domains (which I run for myself and my friends' & associates' businesses) are on my friend's (not my) obama.com server, but the nameserver is on still another box run by the same guy, so my nameservers are actually ns1.bush.com and ns2.bush.com . I have no access to the nameserver ns*.bush.com. Unfortunately, it apparently has some problems. Because I'm overseas but need a server on the US backbone, I've outsourced to a nice guy who runs a small server farm (bush.com) to take care of everything, so I have restricted access for good reason. But limited access means limited control.

The problem is that many people are having problems reaching my website or sending email due to domain name resolution problems, "unknown host" and DNS timeouts.

It's reachable by about 80% of the world but unreachable to another 20%, including myself at the moment. I can get thru by IP but not by domain name. Running nslookup, I can successfully and instantly get info on every esoteric domain name and parked domain in the world, except for only the domains on that particular box. So there's something wrong with the DNS on that nameserver (ns*.bush.com). And this has been happening intermittently a lot lately. My friend doesn't see any anomalies himself, but I do.

I have another box on the backbone of another country here, just a hop skip and a jump away, where I can walk in and get my hands on it 24/7 (bought it at the store myself, brought it into the IDC), and I have complete access to this one (the hypothetical ns*.mccain.com which already hosts domains), SSH to root and all. I was thinking hey, why don't I just set up the president.com domain on this box, too, add my ns2.mccain.com nameserver to the domain on the registrar as secondary nameserver after ns1.bush.com, and then set up the DNS to point towards the old obama.com box run by my friend for everything except a backup website locally?

Or do I know just enough to be dangerous?

Do you think this is a useful guide for others?

Any technical comments would be greatly appreciated. (No votes, please, just technical comments.)
 
I expect someone else will have a different opinion, but although I didn't read your entire post in detail, on the face of it it looks OK except that you must keep in mind that IF you have email for president.com switched ON in Plesk on mccain, any other domain on mccain sending email to presedent.com will have the email sent to president.com on mccain and not obama.

There is no need to have one master and one slave. Both can be masters. Or all four can be masters in your case. No problem.

Some things you might want to consider:

A large number of companies offer "secondary" DNS facilities (which can also be primary). You might want to consider using those in order to have totally separate DNS from your servers, under your direct control. Sure something might go wrong with one. But if you get your services from two different companies you should be OK. And for that matter, some of these companies offer fully redundant DNS servers so nothing should go wrong.

You might alternatively like to invest in a couple of VPSes (in the US I suppose), and install something like 4PSA DNS Manager or one of the free control-panel based alternatives which give you a nice web-based GUI for your DNS.

Faris.
 
Thank you, Faris. 4PSA on a VPS looks like a worthy solution for secondary DNS, for those without a second server.

Regarding my solution in the first posting of this thread, I have implemented my Plesk solution and it fixed all my problems, creating no others, except for the mail one you pointed out, switching off the mail.

However, what about extending my Plesk solution one step further. Since most domains on a server have the exact same DNS setup, why not just set up one domain with the secondary DNS info and then just adding all the other domains as aliases?

In other words, if I have 7 domains with this primary nameserver problem, all with the same shared IP on the old box, then I can create one of the domains on the secondary box with the exact same DNS settings, and make the other 6 domains to be aliases.

For example, if I have president.com , vicepres.com , staffchief.com , pressec.com , etc., then I create only president.com on the box with ns*.mccain.com , get all its settings right, then add aliases vicepres.com , staffchief.com , etc., onto president.com . Easy peasy!

Anyone see any problem with this?
 
Back
Top