Setting Up Reverse DNS Zones

Reverse DNS, or rDNS, maps an IP address to a hostname. Reverse DNS serves a number of different purposes from email to network troubleshooting. Some of the benefits include:

  • Adding a label for network troubleshooting tools such as traceroute.
  • Populating the “Received:” header field in an SMTP email.
  • Checking for generic reverse DNS such as 1-2-3-4.example.com to identify spammers.
  • Verifying a relationship between the owner of a domain name and the owner of the server (IP address).
  • Writing a human readable hostname to the log files for system monitoring tools.
  • Determining which hostname is affected when maintenance is performed on an IP address.

Before getting started with setting up reverse DNS within your Oracle Cloud Infrastructure account, contact your IP provider and confirm that they allow delegation of your reverse DNS zone. If they do not allow delegation, typically they can host your pointer record (PTR) for you and no reverse DNS configurations are required within your Oracle Cloud Infrastructure account. If they do allow delegation, confirm the exact syntax of the reverse DNS hostname with them, as some providers use slashes and some use dashes. Additionally, if you are delegating a reverse DNS zone, confirm that this zone matches exactly what you configure in your Oracle Cloud Infrastructure account as this is necessary in order for delegation to work properly.

After you create and publish your reverse DNS zone and PTR records, you can update your reverse DNS zone delegation with your IP provider. Delegation changes are not required with your domain registrar with a reverse DNS zone.

Setting up a reverse DNS zone is different for the two types of IP address blocks. Use the following procedures to set up a reverse DNS zone for your IP address block type.

Using the Console

Setting Up Reverse DNS for Classless Address Block (Partial Range of IP Addresses)

To find your reverse DNS zone name using classless address block
  1. Make a note of your network IP address. For example, 192.168.15.224/27.
  2. Remove the netmask portion of the address. This is the number after the slash (/). For example, remove the '27' after your IP address, 192.168.15.224/27.
  3. Reverse the order of the remaining octets. For example, 224.15.168.192.
  4. Append ‘in-addr.arpa’ to the end of the IP address. For example, 224.15.168.192.in-addr.arpa.

    Note

    Some assigning authorities require you to use a slash (/) instead of a dash (-) in the reverse address. Ask which character to use when you contact your assigning authority to delegate the reverse address.

  5. Add the netmask back into the address. For example, 224-27.15.168.192.in-addr.arpa.

In this example, 224-27.15.168.192.in-addr.arpa is your reverse DNS zone name.

To create your DNS zone
  1. Open the navigation menu. Under Core Infrastructure, go to Networking, DNS Management, and click Zones.
  2. Click Create Zone.
  3. In the Create Zone dialog box, choose one of the following methods:
    • Manual - Enter the following:
      1. Zone Name: Enter the name of a zone you want to create. Avoid entering confidential information.
      2. Zone Type: If you want to control the zone contents directly within OCI, select Primary. If you want OCI to pull zone contents from an external server, select Secondary and enter your Zone Master Server IP address.
    • Import - Drag and drop, select, or paste a valid zone file into the Import Zone File window. The zone is imported as a primary zone. For information about formatting a zone file or how to amend a zone file exported from GoDaddy.com, see Formatting a Zone File.
  4. Click Submit.

The system creates and publishes the zone, complete with the necessary SOA and NS records.

To create a pointer record (PTR) for each host address

As part of the process of setting up a reverse DNS zone, you need to add a PTR record for each host address. This is done specifically for reverse DNS zones to ensure requests are properly routed for resolution.

  1. Open the navigation menu. Under Core Infrastructure, go to Networking, DNS Management, and click Zones.
  2. Click the Zone Name in which you want to add the PTR record. Zone details and a list of records appear.

    Tip

    You can use the Zone Name sort filter to list to sort zone names alphanumerically in ascending or descending order.
  3. Click Add Record.
  4. In the Add Record dialog box, select the PTR – Pointer record type from the drop-down list. Enter the following information:

    • Name: Optional. Name of the subdomain.
    • TTL: Click the lock icon to unlock this field. All PTR records in the zone will be updated to reflect the last changes to TTL. This value indicates how long you want to allow external nameservers to cache the information about a given DNS record.
    • TTL Unit: Select the unit of time used for the TTL value.
    • RData Mode: Select Basic or Advanced format. If you select Advanced, enter the canonical hostname (for example, example.com) that the record is going to point to in the RDATA field.
    • Hostname: The web address of your zone.

    For more information about the PTR record type, see Supported Resource Records.

  5. Click Submit.
  6. Once your record has been added, click Publish Changes.
  7. In the confirmation dialog box, click Publish Changes.

To add CNAME records for each host at your ISP

If your IP provider does not automatically configure the CNAME record on your behalf, you will need to add a CNAME record for each host at your ISP. This is done specifically for reverse DNS zones to ensure requests are properly routed for resolution.

  1. Make a note of the IP address and your desired CNAME for each host in your new reverse DNS zone.
  2. Contact your ISP and request that they append a CNAME record for each host in your Oracle Cloud Infrastructure DNS zone to your account with them.
  3. Test the reverse DNS path by running the following command:

    dig -x <insert any regular forward-formatted IP address from the zone> +trace

    See Testing DNS Using BIND'S dig Tool for more information.

The returned information should show that your reverse domain is now being resolved.

To update your zone delegation

To make your Oracle Cloud Infrastructure hosted zone accessible through the internet, you must delegate your domain with your domain's registrar (usually the website where you purchased your domain, such as GoDaddy.com or Bluehost.com).

  1. Open the navigation menu. Under Core Infrastructure, go to Networking, DNS Management, and click Zones.
  2. Click the Zone Name for the zone you want to delegate. Zone details and a list of records appear.
  3. Use the Type sort filter to locate the NS records for your zone.
  4. Note the name servers in the RDATA field within each NS record.

You can use the noted name servers to change your domain's DNS delegation. Refer to your registrar's documentation for instructions.

Setting Up Reverse DNS for Full Address Block

To find your reverse DNS zone name using full address block
  1. Make a note of your network IP address. For example, 192.168.15.0.
  2. Remove the netmask portion of the address (the last number in the set of 4). For example, 192.168.15.
  3. Reverse the order of the remaining three octets. For example, 15.168.192.
  4. Append ‘in-addr.arpa’ to the end. For example, 15.168.192.in-addr.arpa

In this example, 15.168.192.in-addr.arpa is your reverse DNS zone name.

To create your DNS zone
  1. Open the navigation menu. Under Core Infrastructure, go to Networking, DNS Management, and click Zones.
  2. Click Create Zone.
  3. In the Create Zone dialog box, choose one of the following methods:
    • Manual - Enter the following:
      1. Zone Name: Enter the name of a zone you want to create. Avoid entering confidential information.
      2. Zone Type: If you want to control the zone contents directly within OCI, select Primary. If you want OCI to pull zone contents from an external server, select Secondary and enter your Zone Master Server IP address.
    • Import - Drag and drop, select, or paste a valid zone file into the Import Zone File window. The zone is imported as a primary zone. For information about formatting a zone file or how to amend a zone file exported from GoDaddy.com, see Formatting a Zone File.
  4. Click Submit.

The system creates and publishes the zone, complete with the necessary SOA and NS records.

To create a pointer record (PTR) for each host address

As part of the process of setting up a reverse DNS zone, you need to add a PTR record for each host address. This is done specifically for reverse DNS zones to ensure requests are properly routed for resolution.

  1. Open the navigation menu. Under Core Infrastructure, go to Networking, DNS Management, and click Zones.
  2. Click the Zone Name in which you want to add the PTR record. Zone details and a list of records appear.

    Tip

    You can use the Zone Name sort filter to list to sort zone names alphanumerically in ascending or descending order.
  3. Click Add Record.
  4. In the Add Record dialog box, select the PTR – Pointer record type from the drop-down list. Enter the following information:

    1. Name: Optional. Name of the subdomain.
    2. TTL: Click the lock icon to unlock this field. All PTR records in the zone will be updated to reflect the last changes to TTL. This value indicates how long you want to allow external nameservers to cache the information about a given DNS record.
    3. TTL Unit: Select the unit of time used for the TTL value.
    4. RData Mode: Select Basic or Advanced format. If you select Advanced, enter the canonical hostname (for example, example.com) that the record is going to point to in the RDATA field.
    5. Hostname: The web address of your zone.

    For more information about the PTR record type, see Supported Resource Records.

  5. Click Submit.
  6. Once your record has been added, click Publish Changes.
  7. In the confirmation dialog box, click Publish Changes.

To update your zone delegation

To make your Oracle Cloud Infrastructure hosted zone accessible through the internet, you must delegate your domain with your domain's registrar.

  1. Open the navigation menu. Under Core Infrastructure, go to Networking, DNS Management, and click Zones.
  2. Click the Zone Name for the zone you want to delegate. Zone details and a list of records appear.
  3. Use the Type sort filter to locate the NS records for your zone.
  4. Note the name servers in the RDATA field within each NS record.

You can use the noted name servers to change your domain's DNS delegation. Refer to your registrar's documentation for instructions.