Reverse PTR Name Builder (IPv4)
Build in-addr.arpa PTR names from IPv4 addresses
The Reverse PTR Name Builder for IPv4 converts IPv4 addresses into their corresponding in-addr.arpa reverse DNS names used for PTR records. Enter an address like 192.168.1.100 and the tool returns 100.1.168.192.in-addr.arpa. It also handles bulk input, converting lists of IP addresses for batch zone file preparation.
Understanding Reverse DNS and PTR Records
Reverse DNS is the mechanism that maps IP addresses back to hostnames. While forward DNS answers the question "what is the IP address for mail.example.com?", reverse DNS answers the opposite: "what hostname is associated with 192.168.1.100?". This mapping is stored in PTR (pointer) records under the special in-addr.arpa domain, and it is used throughout networking for logging, security verification, and email delivery.
The reason reverse DNS uses a special format rather than just looking up the IP directly is that DNS resolves names hierarchically from right to left. For forward DNS, mail.example.com is resolved by first querying the com nameservers, then example.com, then mail.example.com. To make IP address delegation work the same way, the octets of the address must be reversed. The IP 192.168.1.100 becomes 100.1.168.192.in-addr.arpa, which allows DNS delegation to follow the same top-down pattern: the 192.in-addr.arpa zone is delegated to the owner of the 192.0.0.0/8 block, who can then delegate 168.192.in-addr.arpa to the owner of 192.168.0.0/16, and so on down to individual /24 zones.
This reversal is simple enough in concept but error-prone in practice. Transposing octets by hand is a reliable source of typos, especially when working with dozens of addresses in a zone file. This tool eliminates that risk by computing the correct in-addr.arpa name automatically, including zone delegation boundaries for CIDR blocks.
How to Build an IPv4 Reverse PTR Name
- Enter one or more IPv4 addresses (e.g.,
192.168.1.100) - The tool reverses the octet order and appends
.in-addr.arpa - Review the generated PTR name ready for use in DNS zone files
- For bulk input, all addresses are converted at once with results listed per line
IPv4 Reverse DNS Name Examples
| IPv4 Address | Reverse PTR Name |
|---|---|
192.168.1.100 | 100.1.168.192.in-addr.arpa |
10.0.0.1 | 1.0.0.10.in-addr.arpa |
172.16.254.3 | 3.254.16.172.in-addr.arpa |
8.8.8.8 | 8.8.8.8.in-addr.arpa |
203.0.113.50 | 50.113.0.203.in-addr.arpa |
1.2.3.4 | 4.3.2.1.in-addr.arpa |
Reverse DNS Zone Delegation Examples
| CIDR Block | Reverse Zone Name | PTR Record Prefix |
|---|---|---|
192.168.1.0/24 | 1.168.192.in-addr.arpa | Single octet (e.g., 100) |
10.0.0.0/16 | 0.10.in-addr.arpa | Two octets (e.g., 1.0) |
172.16.0.0/8 | 172.in-addr.arpa | Three octets (e.g., 3.254.16) |
When to Use the IPv4 PTR Name Builder
- Configuring reverse DNS zones in BIND, PowerDNS, or other authoritative DNS servers
- Email server setup -- Mail servers check PTR records to verify sender IP legitimacy; incorrect PTR names cause delivery failures
- Preparing zone file entries for bulk PTR record creation across a /24 or larger network block
- Troubleshooting reverse lookups by confirming the correct
in-addr.arpaname before runningdig -xornslookup - ISP delegation requests -- Providing the correct zone name when requesting reverse DNS delegation from your upstream provider
- Audit and documentation -- Generating the reverse name for each IP in your allocation for infrastructure records
How IPv4 Reverse DNS Works
Reverse DNS maps IP addresses back to hostnames using the in-addr.arpa domain. The system uses the DNS hierarchy itself by reversing the IP address octets so that delegation follows the same top-down pattern as forward DNS.
Why Octets Are Reversed
DNS resolves names from right to left through the hierarchy. For forward DNS, mail.example.com is resolved by querying the com servers, then example.com, then mail.example.com. To make IP address delegation work the same way, the octets must be reversed:
- IP
192.168.1.100is in the192.0.0.0/8block - That block's reverse zone is
192.in-addr.arpa - The
/16zone192.168.0.0/16maps to168.192.in-addr.arpa - The
/24zone192.168.1.0/24maps to1.168.192.in-addr.arpa - The individual host PTR is
100.1.168.192.in-addr.arpa
PTR Records in Zone Files
A PTR record in the 1.168.192.in-addr.arpa zone file looks like:
100 IN PTR mail.example.com.
The 100 is relative to the zone (representing the last octet), and the target hostname must end with a dot to indicate it is fully qualified.
Classless Reverse Delegation (RFC 2317)
For allocations smaller than a /24, such as a /28 or /29, standard octet-boundary delegation does not apply. RFC 2317 defines a workaround using CNAME records to delegate portions of a /24 zone. The PTR name builder handles these cases by showing both the standard in-addr.arpa name and the appropriate delegation format.
Reverse DNS in Practice
The single most important reason to set up reverse DNS correctly is email. When your mail server connects to another server to deliver a message, the receiving server almost always performs a reverse DNS lookup on your IP address. If there is no PTR record, or if the PTR record points to a hostname that does not resolve back to your IP (a forward-confirmed reverse DNS check, or FCrDNS), your message is likely to be rejected or sent to spam. Every legitimate mail server needs a PTR record that matches its forward DNS, and this tool helps you build the correct in-addr.arpa name for that record.
Beyond email, reverse DNS appears in security logs, intrusion detection systems, and network monitoring dashboards. When you see an IP address in a log, having a hostname next to it makes investigation much faster. Reverse DNS also plays a role in access control: some services allow or deny access based on whether the connecting IP has a valid PTR record. While this is not a strong security measure on its own, it is part of the baseline hygiene expected of well-managed networks.
When requesting reverse DNS delegation from your ISP, you need to provide the exact zone name. For a /24 allocation, this is straightforward: 1.168.192.in-addr.arpa for the 192.168.1.0/24 block. For smaller allocations, the ISP typically manages the zone and creates individual PTR records on your behalf, or uses the RFC 2317 CNAME delegation scheme to give you control over your portion of the zone.
Frequently Asked Questions
Why do mail servers require PTR records?
Many mail servers perform a reverse DNS check on connecting IP addresses as an anti-spam measure. If an IP has no PTR record, or if the PTR hostname does not resolve back to that IP (a forward-confirmed reverse DNS check), the receiving server may reject or quarantine the message. Setting up correct PTR records is one of the fundamental requirements for email deliverability.
Can I create PTR records for addresses I don't own?
No. PTR records must be created in the reverse DNS zone that is delegated to the owner of the IP address block. If you have a /24 allocation from your ISP, they may delegate the reverse zone to your nameservers. For smaller allocations, you typically request that the ISP create PTR records on your behalf.
What is the difference between dig -x and manually querying the PTR name?
The dig -x 192.168.1.100 command is a shortcut that automatically constructs the query for 100.1.168.192.in-addr.arpa with type PTR. The result is identical to running dig PTR 100.1.168.192.in-addr.arpa manually.
Should the PTR record hostname match the forward DNS A record?
Yes. Best practice is to ensure that the PTR record for an IP address points to a hostname that has an A record resolving back to that same IP. This forward-confirmed reverse DNS (FCrDNS) is checked by many mail servers and security tools. A mismatch or broken chain causes deliverability issues and may trigger security alerts.
How do I set up reverse DNS for a cloud-hosted server?
Cloud providers like AWS, Azure, and GCP provide mechanisms to configure PTR records for your instances. In AWS, you submit a request form to associate a PTR record with an Elastic IP. In Azure and GCP, PTR records can be configured through the platform's DNS or network interface settings. The exact process varies by provider, but you still need to know the correct in-addr.arpa name for your IP.
Related Tools
- Reverse PTR Name Builder (IPv6) - Build ip6.arpa PTR names from IPv6 addresses
- BIND Zone A/AAAA Generator - Generate BIND zone A and AAAA records from CSV
- Hostname Validator - Validate hostnames per RFC 1123 standards
- FQDN Validator - Validate fully qualified domain names
- Zone File Linter - Check zone files for syntax errors and duplicates