The pointer (PTR) record and Reverse mapping Explained (2024)

Developers developed the DNS system mainly for forward mapping. In forward mapping, name servers translate names into IP addresses. Later, they added reverse mapping to the DNS system for security and diagnostic purposes. In reverse mapping, name servers translate IP addresses into names. It is an optional feature.

Although reverse mapping is optional, you should use it. In modern computer networks, many services use it to authenticate the source address. For example, email service uses it to verify the source email address. If you do not configure reverse mapping for a domain, other domains will not accept emails originating from it.

How does the name resolution process work in forward mapping?

In the DNS system, when an end device wants to know the IP address of a remote device or service, it sends a name resolution query to the resolver system. The resolver system forwards that query to all name servers in a sequence until it finds the answer.

This sequence is known as the DNS namespace. In other words, the DNS namespace is a sequence of domain names arranged in a hierarchy. A domain name is a text label for the domain. In this hierarchy, the root domain stands at the top. It uses a null character as the label.

You can write a resource name with or without its parent's domain name. If you write its name with parent domain names, it is called an FQDN (Fully Qualified Domain Name) name. An FQDN name uses dots (.) to separate domain names. It starts with the resource's name and ends with the root domain's name. Since the root domain uses a null character as the name, it always ends with a dot.

An example of the FQDN name is ftp.example.com. In this name, ftp is the resource name. It is the child of the example domain. The example domain is the child of the com domain. The com domain is the child of the root domain.

The pointer (PTR) record and Reverse mapping Explained (1)

Each domain uses an authoritative name server to resolve queries for resources available inside it. If it has a child domain, it does not resolve queries for the child domain. It provides a referral to the child domain's authoritative name server.

Only authoritative name servers can resolve queries. If a name server is not authoritative for a domain, it provides a referral to the next authoritative name server in the sequence. Since all authoritative name servers work in a hierarchy, a resolver system can easily reach the authoritative name server that can resolve its queries.

If a resolver system wants to know the IP address of ftp.example.com., it will send its first query to the root name server. The root name server will provide a referral to the com name server. The com name server will provide a referral to the example name server. The example name will provide the IP address of the host running the ftp service.

The pointer (PTR) record and Reverse mapping Explained (2)

The above process is an example of forward mapping. Developers developed the DNS system for it.

How does the name resolution work in reverse mapping?

Now, let us reverse the above process. Suppose the resolver system wants to know the name of the IP address 192.168.0.3. For this, it follows the same steps it uses in forward mapping. It sends the first query to the root name server and follows the referral until it gets the answer.

Unlike FQDN names, IP addresses do not include domain names. An IP address includes two types of addresses: the network address and the host address. For example, in the IP address 192.168.0.3, the network address is 192.168.0, and the host address is 3.

Network addresses are used to organize and find IP addresses. Host addresses are used to provide a unique identity to an endpoint or a resource. A network address is like a domain name. A host address is similar to a resource name.

Since IP addresses do not include domain names, developers used a different approach to build a domain tree for IP addresses in the DNS namespace. They created a domain called ARPA (Advanced Research Projects Agency) as a child domain of the root domain and used it to build a domain tree for IP addresses.

There are two versions of IP addresses: IPv4 and IPv6. To keep the IP addresses of both versions separate, they created two additional domains as the child domains of the ARPA domain. For IPv4 addresses, they created the in-addr domain. For IPv6 addresses, they created the ip6 domain. They constructed the domain tree for both versions inside their respective domains. To construct a domain tree for IP addresses, they used network addresses.

But there was a problem. Unlike domain names which are written from right to left in FQDN names, network addresses are written from left to right in IP addresses. To solve this problem, they flipped the IP addresses in the domain tree. For example, the IP address 192.168.0.3 will be written as 3.0.168.192 in the domain tree.

The DNS system uses FQDN names. An FQDN name includes all parent domain names. To convert this address into the FQDN address, we need to write its parent domain's name with it. 192.168.0.3 is an IPv4 address. The parent domain of IPv4 addresses is in-addr. The in-addr domain is the child of the ARPA domain. The ARPA is the child domain of the root domain. Because of this, the FQDN name of the IP address 192.168.0.3 will be 3.0.168.192.in-addr-arpa.

The pointer (PTR) record and Reverse mapping Explained (3)

If the resolver system wants to know the name of the service or host using the IP address 192.168.0.3., it sends the first query to the root name server. The root name server provides a referral to the arpa name server. The arpa name server provides a referral to the in-addr name server. The in-addr name server provides a referral to the 0.168.192 name server. The 0.168.192 name server provides the name associated with host address 3.

The pointer (PTR) record and Reverse mapping Explained (4)

The above process is an example of reverse mapping. Developers added it to the DNS system for security and diagnostic purposes.

Zone files

Authoritative name servers use zone files to provide the name resolution service. There are two types of zone files: forward lookup zone file and reverse lookup zone file. A forward lookup zone file maps names with IP addresses. A reverse lookup zone file maps IP addresses with names. If you do not want to provide reverse lookup for a domain, you do not need to create reverse lookup zone files for it.

There are two versions of IP addresses: IPv4 and IPv6. You can use a single forward lookup zone file to map names with IP addresses of both versions. But you cannot use a single reverse lookup zone file to map both versions' IP addresses with names. You need to use separate reverse lookup zone files for both versions.

You only need to create a reverse lookup zone file for the IP version your domain uses. For example, if your domain does not use IPv6 addresses, you do not need to create a reverse lookup zone file for IPv6 addresses.

Forward lookup zone files are compulsory. You need to create a forward lookup zone file for every domain. In that file, you need to add records for all resources whose names you want to translate.

Reverse lookup zone files are optional. You only need to create a reverse lookup zone file for the domain which runs services that need reverse mapping. In that file, you need to add records only for those services that need reverse mapping.

A reverse lookup zone file uses the same configuration style as a forward lookup zone file. You can easily create a reverse lookup zone file from the forward lookup zone file.

I have already explained the directives, resource records, and configuration settings used in forward lookup zone files in previous tutorials of this series. If you have not checked them yet, I suggest you check them with this tutorial. Previous tutorials of this series are the following.

DNS zone file Format, Configuration, and Directives

The TTL and ORIGIN directives in the zone file

Types of resources records in zone files

The SOA Record Explained in the DNS zone file

The NS Record, Glue Record, and Lame Delegation

The MX record in a zone file explained

The A, AAAA, and CNAME resource records

The following points provide a brief recap of previous tutorials.

  • Authoritative name servers use zone files to resolve DNS queries.
  • You can store three things in a zone file: comments, directives, and resource records.
  • A comment starts with a semicolon and goes to the end of the line. If you put a semicolon at the start of a line, the name server ignores the entire line. If you put a semicolon in the middle of the line, the name server ignores everything that comes after the semicolon.
  • A directive works as a variable. You can use it to store a value you want to use later in the file.
  • The TTL directive defines the maximum time a resource served from the file can be cached.
  • The ORIGIN directive defines the domain name. The name server uses it to convert all relative names that come after it into FQDN names.
  • In a zone file, the name server considers all names that do not end with a dot as relative names.
  • An FQDN name ends with a dot. The name server uses it as it is.
  • A zone file uses resource records to map names and IP addresses.
  • There are many types of resource records. The vital resource record types are the SOA, NS, MX, A or AAAA, CNAME, and PTR.
  • An SOA record defines the characteristics and properties of the domain.
  • An NS record defines the authoritative name servers for the domain.
  • An MX record defines mail servers for the domain.
  • An A or AAAA record maps a name with the IP address.
  • A CNAME record maps an alias name with the canonical name.
  • A PTR record maps an IP address with the name.

Creating a reverse lookup zone file

Administrators configure the name server to handle forward and reverse mapping separately. They configure two separate zone files for forward and reverse mapping. In forward mapping, the query will be for a resource available within the example.com domain. In reverse mapping, the query will be for a resource available within the 192.168.0 network.

If the name server receives a query for the resource available within example.com, it uses the forward zone file to resolve the query. If it receives a query for the resource available within network 192.168.0, it uses the reverse zone file to resolve the query.

The following image shows the forward zone file of the example.com domain.

The pointer (PTR) record and Reverse mapping Explained (5)

The following is a reverse lookup zone created from this forward lookup zone file. The name server will use to resolve queries for the resources available in the network 192.168.0.

The pointer (PTR) record and Reverse mapping Explained (6)

Let us understand this file's configuration in detail.

The first line is a comment. The name server will ignore it.

The next is the TTL directive. It defines the maximum time other name servers or resolver systems can cache records severed from this file.

The pointer (PTR) record and Reverse mapping Explained (7)

The next is the ORIGIN directive. It defines the domain name. As explained earlier, in reverse mapping the domain name is the network address of the domain. To convert it into an FQDN name, we need to follow two steps. First, we need to flip it then we need to add the parent domain's name to it. In our example, the domain's network address is 192.168.0. If we flip this address, we get 0.168.192. With the parent domain's name, it will be 0.168.192.in-addr-arpa.. Zone files are not case-sensitive. You can specify a name in both upper and lower cases.

The pointer (PTR) record and Reverse mapping Explained (8)

The next is an SOA record. It defines the characteristics and properties of the domain.

The next is the NS record. It defines authoritative name servers for this domain.

The SOA and NS are compulsory records. These records are the same in both the forward and reverse zone files. You can copy them from the forward zone file. To learn more about these records, you can check previous tutorials of this series.

The pointer (PTR) record and Reverse mapping Explained (9)

The next is PTR records.

As mentioned earlier, developers developed the DNS system to translate resource names into IP addresses or alias names. At that time, there was no requirement to translate IP addresses into resource names. Since this feature was not required, they did not develop it in the original DNS system.

When the need for this feature arose, they developed a method to use IP addresses as alias names. Since the existing DNS system already had the necessary functionality for translating alias names, they did not require to modify it.

The existing system uses CNAME records to map alias names with canonical names. They created a new resource record type called PTR from this resource record type.

PTR records do the same thing in the reverse lookup zone file that CNAME records do in the forward lookup zone file. They map alias names (which are actually IP addresses) to canonical names (resources' original names).

A PTR record uses the following syntax.

name (host portion of the IP address) TTL class resource-record-type name (name of the resource)

Let us understand the above syntax field-by-field.

The name Field

This field defines the resource's IP address as the name. You can convert the resource's IP address into the FQDN name and use it in this field or you can type only the host portion of the IP address and the name server will automatically convert it into the FQDN name using the $ORIGIN directive's value.

For example, the IP address of ns1.example.com. is 192.168.0.1. If you want to specify the FQDN of this IP address, you need to use the following.

1.0.168.192.-in-addr-arpa.

If you want to specify only the host portion of the IP address, you need to type 1 in this field.

The name server considers all names that do not end with a dot as relative names. It automatically attaches the value of the $ORIGIN directive to it to convert it into the FQDN name.

The pointer (PTR) record and Reverse mapping Explained (10)

The TTL Field

This field defines the maximum time the resolver system can cache this record. If we leave this field empty, the name server uses the $TTL directive's value.

The class Field

This field defines the class type of this record. There are three classes: IN, CH, and HS. Currently, only the IN class is used. The CH and HS classes were used when the Internet was an in-house project in the MiT lab. CH stands for CHAOS. It is an MIT LAN protocol. HS stands for Hesiod. It is an information service used at MIT. IN stands for the Internet that we use today.

The resource-record-type Field

This field defines the type of record. A PTR (Pointer Record) record maps an IP address (defined as a name in the first name field) to the name (resource's name defined in the last name field.)

The pointer (PTR) record and Reverse mapping Explained (11)

The name Field

This field defines the resource's name. The name server provides this name when it receives a query for the IP address defined in the first name field. You can not use the relative name in this field. You must use the FQDN name of the resource in this field.

The pointer (PTR) record and Reverse mapping Explained (12)

The pointer (PTR) record and Reverse mapping Explained (2024)

FAQs

What is a PTR record for reverse DNS? ›

A DNS pointer record (PTR for short) provides the domain name associated with an IP address. A DNS PTR record is exactly the opposite of the 'A' record, which provides the IP address associated with a domain name. DNS PTR records are used in reverse DNS lookups.

What is the purpose of the PTR record and the reverse DNS in the regards of combating spam or improving your email ranking towards ham? ›

Focusing on Email Security

Anti-spam Measures: Many email servers and spam filtering systems perform reverse DNS lookups as part of their vetting process for incoming emails. A PTR record that successfully maps an IP address to a legitimate domain name is one of many indicators that the email is not spam.

What is the PTR record in Ultahost? ›

A PTR record is a type of DNS record used for reverse DNS lookups. Unlike regular DNS records that map domain names to IP addresses, PTR records map IP addresses to domain names. This helps identify the domain name associated with individual IP addresses.

What do pointer PTR records resolve? ›

A pointer (PTR) record resolves an IP address (made up of numbers and decimals) into a domain name (such as okta.com). The act of translating an IP address into a domain name is known as a reverse lookup in the Domain Name System (DNS).

Why is PTR record used? ›

Authentication and Verfication: PTR records help SMTP servers verify that the IP address of the sending server connects to a legitimate domain name. This helps prevent email spoofing. Spam Prevention: Many SMTP servers use PTR records to calculate the likelihood that an incoming email is spam.

What is the purpose of the PTR? ›

The PTR is proof that you paid your tax due to the government. Only professionals with a valid PRC ID must pay for PTR. Professionals have to pay the PTC annually.

What is the purpose of a pointer PTR DNS record quizlet? ›

PTR record creates a pointer that maps a hostname to an IP address for reverse lookups.

Do I need a PTR record for email? ›

The Importance of Setting Up PTR Records

This management control helps establish a strong grip over the email ecosystem since a properly set PTR record is a sign of legitimacy to recipients' mailboxes and email servers. This ultimately improves your sender's reputation and engagement rate.

What is the meaning of PTR? ›

PTR (Price to Retailer) is short form of “Price to Retailer”. PTR is general term frequently used by companies to mention the price of product offered to retailer.

Who controls PTR records? ›

PTR records are managed by the company that provides you with your IP address.

Who can set PTR record? ›

The PTR record for your server's IP address is controlled by the server provider, and you should contact your server provider to set the PTR record. The name used in the PTR doesn't need to be and generally isn't associated with any domains on the server.

How do I check my PTR record? ›

How to lookup PTR records on Windows. To check the PTR records for a certain domain name on Windows, follow these steps: Open a command prompt by navigating to Start → 'Type here to search' → 'cmd' → Open. Type nslookup -q=ptr example.com and hit [enter] to get the PTR records for example.com .

What is the difference between PTR record and reverse DNS? ›

The reverse DNS record (rDNS) is also known as the PTR record, pointer record, or IP resolver. A PTR is a reverse record for an IP address that allows an IP to map to a domain and vice versa. That means you can make hostgator.com point to 10.0. 0.1 and make a PTR record so that 10.0.

What are the best practices for PTR record? ›

Ideally, a PTR record should belong to the same domain that sends emails to Support. It should not contain IP address numbers or keywords that indicate that an IP address belongs to a residential ISP. Example of the correct record for domain.com: host 1.2.

What is an example of a reverse DNS record? ›

Using rDNS, the IP address is reversed, and then the in-addr.arpa is added to the end. For example, if you use the IPv4 address of 67.227. 187.136, using rDNS, it would become 136.187.227.67.in-addr.arpa. This method of reverse DNS resolution of an IP address uses a PTR.

How to create a DNS ptr record? ›

POINTER (PTR) Record
  1. Set up the Reverse Zone. Make sure you are in the reverse DNS zone you already created. ( ...
  2. Navigate to Managed DNS. Select your Reverse DNS Zone.
  3. Add the PTR Record. Under “PTR Records” click the plus sign to add a new record.
  4. Configure The Record. Enter the following values for the PTR record:
Jun 21, 2021

Which DNS zone record is used for reverse lookups? ›

A reverse lookup zone is an authoritative DNS zone that is used to resolve IP addresses to network resource names. It is created by inverting the IP address and using a special RR called a PTR record to map the IP address to the fully qualified domain name (FQDN).

What is a Cname PTR record? ›

Each DNS database zone file consists of one or more resource records, including the Canonical Name (CNAME), Pointer (PTR) and Mail Exchange (MX) records. Creating and updating the resource records that comprise the DNS zone files is one of the primary tasks of a DNS administrator.

What is PTR record for DHCP? ›

The PTR record maps a client's IP address to its host name. For each record that is updated dynamically, an associated text (TXT) record is written to identify that the record was written by DHCP.

References

Top Articles
Marvel Snap Review - IGN
Stagecoach Bus Timetable - 21/21A/22/23/25 - Hales Place-Canterbury - April 2015 • EUR 5,78
What Is Single Sign-on (SSO)? Meaning and How It Works? | Fortinet
Where are the Best Boxing Gyms in the UK? - JD Sports
Bild Poster Ikea
Pet For Sale Craigslist
Www.fresno.courts.ca.gov
Midflorida Overnight Payoff Address
Hotels Near 500 W Sunshine St Springfield Mo 65807
Red Wing Care Guide | Fat Buddha Store
Evil Dead Rise Showtimes Near Regal Columbiana Grande
Michaels W2 Online
2016 Ford Fusion Belt Diagram
VMware’s Partner Connect Program: an evolution of opportunities
Colorado mayor, police respond to Trump's claims that Venezuelan gang is 'taking over'
5 high school volleyball stars of the week: Sept. 17 edition
Simpsons Tapped Out Road To Riches
Mzinchaleft
Adam4Adam Discount Codes
Willam Belli's Husband
Hocus Pocus Showtimes Near Amstar Cinema 16 - Macon
3S Bivy Cover 2D Gen
Joann Ally Employee Portal
Tyrone Unblocked Games Bitlife
Big Lots Weekly Advertisem*nt
12 Top-Rated Things to Do in Muskegon, MI
Ice Dodo Unblocked 76
Rochester Ny Missed Connections
Yonkers Results For Tonight
Home
Hampton University Ministers Conference Registration
Jayah And Kimora Phone Number
Bill Remini Obituary
BJ 이름 찾는다 꼭 도와줘라 | 짤방 | 일베저장소
2011 Hyundai Sonata 2 4 Serpentine Belt Diagram
Maine Racer Swap And Sell
Vlacs Maestro Login
King Soopers Cashiers Check
Sitting Human Silhouette Demonologist
Ket2 Schedule
Rogers Centre is getting a $300M reno. Here's what the Blue Jays ballpark will look like | CBC News
18006548818
Citizens Bank Park - Clio
Human Resources / Payroll Information
Strange World Showtimes Near Marcus La Crosse Cinema
Iron Drop Cafe
4Chan Zelda Totk
Ewwwww Gif
De Donde Es El Area +63
Round Yellow Adderall
Law Students
Affidea ExpressCare - Affidea Ireland
Latest Posts
Article information

Author: Geoffrey Lueilwitz

Last Updated:

Views: 6505

Rating: 5 / 5 (80 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Geoffrey Lueilwitz

Birthday: 1997-03-23

Address: 74183 Thomas Course, Port Micheal, OK 55446-1529

Phone: +13408645881558

Job: Global Representative

Hobby: Sailing, Vehicle restoration, Rowing, Ghost hunting, Scrapbooking, Rugby, Board sports

Introduction: My name is Geoffrey Lueilwitz, I am a zealous, encouraging, sparkling, enchanting, graceful, faithful, nice person who loves writing and wants to share my knowledge and understanding with you.