How do I use Route 53 to set up reverse DNS for my SMTP servers?

4 minute read
0

I want to use Amazon Route 53 to set up reverse DNS resolution for my Simple Mail Transfer Protocol (SMTP) servers. However, I don't know how to create the required pointer (PTR) records and set up delegation.

Short description

To set up reverse DNS in Route 53, create a public hosted zone, add PTR records, and set up delegation for your IP addresses. The process varies depending on whether you use on-premises SMTP servers or SMTP servers in Amazon Virtual Private Cloud (Amazon VPC).

Resolution

Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshooting errors for the AWS CLI. Also, make sure that you're using the most recent AWS CLI version.

On-premises SMTP servers

If you have an on-premises SMTP server and use non-AWS resources, then a third party might own your IP addresses. The third party can include another cloud computing platform or an Internet Service Provider (ISP). To configure reverse DNS, use the method that's provided by your IP address owner.

Create a public hosted zone

Note: This resolution uses 1.2.3.4 (IPv4) and 2001:db8:: (IPv6) as example IP addresses for the SMTP server.

To configure Route 53 to respond to reverse DNS lookup queries for your server, complete the following steps:

  1. Create a public hosted zone for your server's IP address.
    Example hosted zones include 4.3.2.1.in-addr.arpa for IPv4 and 8.b.d.0.1.0.0.2.ip6.arpa for IPv6.
  2. Add a PTR record in the hosted zone.

Note: For non-octet boundary address ranges, use the zone name that the IP address owner provides for delegation.

Create a PTR record

To create a PTR record for your SMTP server, complete the following steps.

  1. Create a record set for your hosted zone.
  2. Create a PTR record for your SMTP server. For Name, enter the reversed IP address plus in-addr.arpa for IPv4 or ip6.arpa for IPv6.
    For example, 4.3.2.1.in-addr.arpa (IPv4) or 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arp (IPv6).
    For Type, choose PTR.
    For Value, enter the fully qualified domain name (FQDN) of the SMTP server. For example, mail.example.com.

Note: For domains with multiple IP address blocks, create additional reverse hosted zones with corresponding PTR records.

Set up delegation

After you create the PTR record, ask the IP address owner to set up delegation to the name servers in your reverse hosted zone.

To locate name server details, complete the following steps:

  1. Open the Route 53 console.
  2. In the navigation pane, choose Hosted zones.
  3. Select your hosted zone.
  4. Note the values for your NS record type.
  5. Provide these name server details to your IP address owner to set up delegation.

Note: The time for the new configuration to take effect depends on the time to live (TTL) records of the previous name server record. The TTL records of the previous name server record might be in the cache of end user local DNS servers.

SMTP servers in Amazon VPC

  1. Create a forward DNS record (type A) that points to your Elastic IP address.

  2. Update the reverse DNS record:
    For IPv4 addresses, use the Amazon Elastic Compute Cloud (Amazon EC2) console or run the following AWS CLI command:

    aws ec2 modify-address-attribute --allocation-id eipalloc-### --domain-name mail.example.com
  3. For IPv6 addresses, create an AWS Support case and include the following details:
    Your IPv6 addresses
    The desired reverse DNS records
    Proof of domain ownership

Note: Before you request reverse DNS changes through AWS Support, set up forward DNS records.

Related information

Why can't my server receive email after I created an MX record for my SMTP server in Route 53?

Configuring Amazon Route 53 as your DNS service

Routing traffic to your resources