Multiple Linodes, Multiple Domains

I have just recently added another Linode to my account, meaning I have two Linodes in total.

–- So, I have 2 IPs

And for explanations sake, let's say I also have two domains.

At the moment, both domains are pointing to the same IP, lets call it IP1. So no matter which IP I access via WAN, it will direct me to IP1.

Now, the part I'm confused about.

I decided to point Domain 2 to IP2 so I could have two separate sites.

My question is about MX records, particularly the mail record. As of right now, IP1 has an MX record of mail.domain1.com and a priority of 0, while IP2 has an MX record of mail.domain2.com with a priority of 10. I assumed that since they are separate IPs, I should set the IP2 MX record priority to 0 also.

Am I correct in doing this?

7 Replies

This depends on where you want the e-mail delivered. You should point the MX records at the IP of the server that will handle your incoming mail.

That's the only thing MX records are used for. Say you want to send an e-mail to example@domain1.com - it will have to lookup the MX record for domain1.com, and then tell that server (mail.domain1.com in your example) that there is an e-mail for example@domain1.com. The mailserver will handle the delivery from there.

The same goes for domain2, they are completely separate. Just point the MX records at the server that will handle incoming mail for that domain :)

So what your saying is:

  • It is better practice to use one particular server to handle your mail

  • It is bad practice to give each server its own mail server

Because that was what I was trying to do.

I added a new linode with intentions of starting from scratch again, migrating my content to the new freshly updated and stable server (the new linode), and using the old linode as a backup server… or whatever else I might need.

I'm not going to even pretend that I know anything about a DNS or any of the associated jargon. (A/AAA, MX, CNAME, etc) Hopefully that explains the vagueness of my question, if it was vague at all.

Updating to the latest ZPanel version is what I really want done, but that requires you backup, erase the hard drive, and start from a clean install. Unfortunately, it isn't the best idea to shut down a retail site, much less a production server.

It doesn't have to be bad practice, it would depend on your usecase. I think a lot of us here use an external service for it, e.g. Google Apps (gmail), or another e-mail provider. Using a separate mail handler on each domain is not something I would do or recommend myself, but it is not necessarily bad. If you prefer it that way you can absolutely do so.

If I'm understanding you correctly and what you want do to is actually a migration (the aim is to shut down server A once everything is placed on server B) I would just keep everything pointing to server A, then configure server B, and once it is ready change the DNS to point to server B. You may have a very short overlap because of cached entries (make sure to set a very low TTL in advance).

As a sidenote, are you aware of the zpanel drama of last year? http://www.reddit.com/r/netsec/comments … er_fucken/">http://www.reddit.com/r/netsec/comments/1ee0eg/zpanelsupportteamcallsforumuserfucken/

@Nuvini:

shut down server A once everything is placed on server B) I would just keep everything pointing to server A, then configure server B, and once it is ready change the DNS to point to server B. You may have a very short overlap because of cached entries (make sure to set a very low TTL in advance).

This procedure is pretty much exactly what I did when I migrated from shared hosting to Linode. It was the first time I had ever used a VPS. I learned a lot from just trial and error. I must have started from scratch at least 15 times, installing Zpanel, fixing the passwords, verifying that email works, the domain works, the sub domain works… over and over and over again..

When you say to make sure the TTL is low, what do you mean? What will that do for me I guess is what I'm asking, and what kind of consequences would I get from not doing it?

> As a sidenote, are you aware of the zpanel drama of last year
http://www.reddit.com/r/netsec/comments … er_fucken/">http://www.reddit.com/r/netsec/comments/1ee0eg/zpanelsupportteamcallsforumuserfucken/

No, I wasn't aware of the drama… but I could care less about drama and more about the actually vulnerability they're pointing out about obtaining root access, that's pretty bad…. Though still, there are hundreds of people continuing to use it. I couldn't survive in a full linux environment without a server admin panel like Zpanel or CPanel (which I don't want to have to pay for)… I would love so much to be good enough at Unix Systems Administratin that I don't need a GUI, but you don't become a *nix expert overnight, nor can you do it while on the job; everything is trial and error and everything is learned incredibly too fast and without note-taking. If I only had more time and less stress, responsibilities. and distractions in this office I could get myself a book or two and learn something in a valuable way, but you know.. life.

Is there something better than ZPanel? I've heard of webmin but haven't got around to installing it yet.. I wouldn't mind experimenting with other control panels while I have this time in between migration. What would you suggest?

In the DNS Manager you have a TTL option. This defines how long a DNS record should be cached. If it is set to something very high, your clients, the people that need to resolve your domain might still have the IP addresses that are linked to that domain in their cache. If you have a TTL of say, 5 minutes, you're basically saying that they should not be cached for more than 5 minutes. After that the clients should query the nameservers again.

The downside of this is that it adds a little bit of overhead, since every 5 minutes the nameservers have to be queried again. The upside is that you shouldn't be seeing users resolving to your old IP for very long.

It should be noted that some ISPs have DNS servers that tend to ignore the TTL a bit, so it's not a 100% certainty new records will be looked up after those 5 minutes, but generally this is the way to go when switching IPs and wanting changes to be done quickly.

–---

Regarding Zpanel - sure, but it gives you an idea about the kind of people that are developing it and whether you trust their programs on your machine after this kind of thing. I'm not saying you shouldn't use it, but I think you should be aware of it and than make a decision :)

I'm aware of cPanel and DirectAdmin and Webmin/Virtualmin. If I had to pick one, I'd say DirectAdmin. If I had to pick a free one, I'd go with Webmin. Personally I don't use a control panel so I can't give you in-depth information about which one is better.

I will look into Webmin immediately.

Thank you for that thorough explanation of TTL, now I know why my current domain changes take so long.

@dockeryz:

I will look into Webmin immediately.

Thank you for that thorough explanation of TTL, now I know why my current domain changes take so long.

You're welcome. Also be aware that Linode's nameservers themselfs only update every 15 minutes if you change them through the Linode Manager. In practice this means that it will take ~30 minutes before changes are done on all 5 Linode's nameserver.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct