How do I set up rDNS for email while behind a NodeBalancer?

Linode Staff

I'd like to send email from my Linode, but my domain is configured using a NodeBalancer. I can't set rDNS on the NodeBalancer, and this is causing problems with email messages coming from my domain.

How do I set up rDNS for email while behind a NodeBalancer?

1 Reply

DNS is traditionally used to resolve a domain name to an IP address, known as forward resolution. Reverse DNS (rDNS) is the opposite, resolving IP addresses to domains.

If your domain is behind a NodeBalancer or another service that obscures your Linode’s IP address (such as Cloudflare), you will be unable to assign rDNS for the IP of your load-balancing service. This limitation can cause problems with rDNS lookups.

As a workaround, you will want to set an A record on the mailing domain that matches the IP address of the outgoing mail server. Then, configure your Linode’s rDNS to point to the expected hostname of your mail server.

By way of example, this could be accomplished by creating a subdomain such as mail.domain.com. Next, assign an A record on the subdomain pointing to the IP address for your Linode. After configuring the A record for your subdomain, you can set rDNS on the Linode using the subdomain instead of the root domain. This lets you serve a webpage from behind a NodeBalancer while sending mail from a server that does not have its IP address obfuscated by the NodeBalancer’s IP address.

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