Reverse DNS

Reverse DNS, or rDNS, maps an IP address to a hostname .

Reverse DNS serves several different purposes from email to network troubleshooting. Some 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.
  • Evaluating which hostname is affected when maintenance is performed on an IP address.
Note

You can only create reverse DNS zones for IP ranges that you control. Contact support to request a reverse DNS (PTR) record for an IP address owned by Oracle. For example, a public IP address that was automatically assigned to a compute instance or load balancer. For more information, see Reverse DNS (PTR).

Before getting started with setting up reverse DNS within an Oracle Cloud Infrastructure account, contact your IP provider and confirm that they allow delegation  of reverse DNS zone . If they don't allow delegation, typically they can host a pointer record (PTR) for you and no reverse DNS configurations are required within the OCI 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. Also, if you're delegating a reverse DNS zone, confirm that this zone matches exactly what you configure in the OCI account as this is necessary for delegation to work.

After you create and publish a reverse DNS zone and PTR records, you can update the reverse DNS zone delegation with your IP provider. Delegation changes aren't 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 a IP address block type.

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

To find a reverse DNS zone name using classless address block
  1. Make a note of the network IP address. For example, 192.168.15.224/27.
  2. Remove the netmask part of the address. This is the number after the slash (/). For example, remove the 27 after the 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 the 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 the reverse DNS zone name.

To create a DNS zone
  1. Open the navigation menu and click Networking. Under DNS management, click Overview.
  2. Click Zones.
  3. Click Create zone.
  4. Choose a Method for creating the zone.
    • If you choose the Manual method, enter the following information:
      1. Zone Name: Enter the name of a zone you want to create. Avoid entering confidential information.
      2. Create in Compartment: Specify the compartment you want to create the zone in. Be sure you have permission to work in the compartment.
      3. Zone Type: 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 a Zone Master Server IP address.
    • If you choose the Import method:
      1. Drag, 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 change a zone file exported from GoDaddy.com, see Formatting a DNS Zone File.
  5. Click Create.

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 ensures requests are correctly routed for resolution.

  1. Open the navigation menu and click Networking. Under DNS management, click Overview.
  2. Click Zones.
  3. Click the Zone Name in which you want to add the PTR record. Zone details appear.

    Tip

    You can use the Zone Name sort filter to list to sort zone names alphanumerically in ascending or descending order.
  4. Click Records. A list of zone records appear.
  5. Click Add Record.
  6. In the Add Record dialog box, select the PTR – Pointer record type from the 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 are 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 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 the zone.

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

  7. Click Submit.
  8. After the record is added, click Publish Changes.
  9. In the confirmation dialog box, click Publish Changes.

To add CNAME records for each host at your ISP

If your IP provider doesn't automatically configure the CNAME record on your behalf, you need to add a CNAME record for each host at your ISP. This is done to ensure requests are correctly routed for resolution.

  1. Make a note of the IP address and the preferable CNAME for each host in the new reverse DNS zone.
  2. Contact your ISP and request that they append a CNAME record for each host in the 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 shows that the reverse domain is now being resolved.

To update your zone delegation

To make the OCI hosted zone accessible through the internet, you must delegate the domain with your domain's registrar (This is usually the website where you bought the domain, such as GoDaddy.com or Bluehost.com).

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

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

Setting Up Reverse DNS for Full Address Block

Setting Up Reverse DNS for Full Address Block

To find a reverse DNS zone name using full address block
  1. Make a note of the network IP address. For example, 192.168.15.0.
  2. Remove the netmask part 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 the reverse DNS zone name.

To create a DNS zone
  1. Open the navigation menu and click Networking. Under DNS management, click Overview.
  2. Click Zones.
  3. Click Create Zone.
  4. Choose a Method for creating the zone.
    • If you choose the Manual method, enter the following information:
      1. Zone Name: Enter the name of a zone you want to create. Avoid entering confidential information.
      2. Create in Compartment: Specify the compartment you want to create the zone in. Be sure you have permission to work in the compartment.
      3. Zone Type: 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 a Zone Master Server IP address.
    • If you choose the Import method:
      1. Drag, 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 change a zone file exported from GoDaddy.com, see Formatting a DNS Zone File.
  5. Click Create.

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 to ensure requests are correctly routed for resolution.

  1. Open the navigation menu and click Networking. Under DNS management, click Overview.
  2. Click Zones.
  3. Click the Zone Name in which you want to add the PTR record. Zone details appear.

    Tip

    You can use the Zone Name sort filter to list to sort zone names alphanumerically in ascending or descending order.
  4. Click Records. A list of zone records appear.
  5. Click Add Record.
  6. In the Add Record dialog box, select the PTR – Pointer record type from the 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 are 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 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 the zone.

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

  7. Click Submit.
  8. After the record is added, click Publish Changes.
  9. In the confirmation dialog box, click Publish Changes.

To update your zone delegation

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

  1. Open the navigation menu and click Networking. Under DNS management, click Overview.
  2. Click Zones.
  3. Click the Zone Name for the zone you want to delegate. Zone details and a list of records appear.
  4. Use the Type sort filter to find the NS records for the zone.
  5. 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. See your registrar's documentation for instructions.