All Products
Search
Document Center

Reverse lookup & PTR

Last Updated: Nov 12, 2018

What is reverse lookup

A reverse lookup maps an IP address to a domain name. In contrast, a forward lookup resolves a domain name to an IP address.

Before you perform a reverse lookup, you must check whether the IP address corresponds to one or multiple domain names. It is too time consuming to go through the entire DNS to find the corresponding domain names for an IP address. Instead, you can use the PTR record defined in RFC1035 to map IP addresses to domain names.

Add a PTR record

Before you add a PTR record, you must first create a reverse lookup zone file. Then add an IP address to the file.

Assume that your IP address range is 192.168.0.1-192.168.0.255, and the Class C address is 192.168.0.1/24. The corresponding name of the reverse lookup zone file is0.168.192.in-addr.arpa. When you create a PTR record that points 1 to www.example.com in the 0.168.192.in-addr.arpa zone file, the IP address 192.168.0.1 is reversely resolved to www.example.com.

Reverse DNS lookup is available in public networks only after you apply to the Internet service providers (ISP) that owns the IP address and your application is approved.

However, you can manage the following reserved IP addresses in a VPC.

  1. 10.0.0.0 - 10.255.255.255
  2. 172.16.0.0 - 172.31.255.255
  3. 192.168.0.0 - 192.168.255.255

You can create reverse lookup zones in these three reversed IP address ranges in PrivateZone without submitting applications to the ISP.

Add PTR records in the PrivateZone

To add a reverse lookup zone file for 192.168.1.0/24 and add a record to the file, follow these steps.

Note: The name of this reverse lookup zone is 1.168.192.in-addr.arpa. The zone name must end with .in-addr.arpa.

  1. Log on to the Alibaba Cloud DNS console.

  2. In the left-side navigation pane, click Zone list under PrivateZone, and click Add Zone.

  3. In the Add Zone dialog box, enter a Zone Name (in this example, specify the zone name as 1.168.192.in-addr.arpa), and click OK.
    reverse

  4. On the Zone list page, click the newly added zone to enter the Resolution Settings page.

  5. Click Add Record. In the dialog box that appears, specify the Record Type as PTR, and specify the Resource Records as 1, and then specify the Record Value as host001.example.com.
    ptr

  6. Click OK.