Reverse DNS (in-addr.arpa / ip6.arpa)

How reverse DNS works, PTR record construction, and examples for IPv4 and IPv6 addresses.

What is Reverse DNS?

Reverse DNS (rDNS) converts IP addresses back to domain names using PTR records. While normal DNS goes from name to IP address, reverse DNS goes from IP address to name. This is used for logging, email verification, security checks, and troubleshooting. Many mail servers require valid reverse DNS to accept email.

How Reverse DNS Works

Reverse DNS uses special domains that represent IP addresses in reverse order: - IPv4 uses the .in-addr.arpa domain - IPv6 uses the .ip6.arpa domain The IP address is reversed and each part becomes a label in the domain name, then a PTR record provides the hostname.

IPv4 Reverse DNS (in-addr.arpa)

Process Steps

  1. Take the IPv4 address (e.g., 192.0.2.1)
  2. Reverse the octets (1.2.0.192)
  3. Add .in-addr.arpa domain (1.2.0.192.in-addr.arpa)
  4. Query for PTR record at that name
  5. PTR record contains the hostname

IPv4 Examples

IP Address: 192.0.2.1
Reverse Name: 1.2.0.192.in-addr.arpa
PTR Record: host1.example.com
Explanation: Each octet becomes a label, in reverse order
IP Address: 10.0.0.1
Reverse Name: 1.0.0.10.in-addr.arpa
PTR Record: gateway.internal
Explanation: Private addresses can have internal PTR records
IP Address: 172.16.254.1
Reverse Name: 1.254.16.172.in-addr.arpa
PTR Record: router.company.local
Explanation: Common for infrastructure devices
IP Address: 8.8.8.8
Reverse Name: 8.8.8.8.in-addr.arpa
PTR Record: dns.google
Explanation: Public DNS servers typically have rDNS

Network Delegation

ISPs delegate reverse DNS zones to customers for their IP blocks

NetworkReverse ZoneDescription
192.0.2.0/242.0.192.in-addr.arpaEntire /24 network reverse zone
203.0.113.0/270-27.113.0.203.in-addr.arpaSmaller subnet with CNAME delegation

IPv6 Reverse DNS (ip6.arpa)

Process Steps

  1. Take IPv6 address and expand to full form
  2. Remove colons and reverse all hex digits
  3. Insert dots between each hex digit
  4. Add .ip6.arpa domain
  5. Query for PTR record

IPv6 Examples

IP Address: 2001:db8::1
Expanded: 2001:0db8:0000:0000:0000:0000:0000:0001
Reverse Name: 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa
PTR Record: host1.example.com
Note: Each hex digit (nibble) becomes a separate label
IP Address: 2001:db8:85a3::8a2e:370:7334
Expanded: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
Reverse Name: 4.3.3.7.0.7.3.0.e.2.a.8.0.0.0.0.0.0.0.0.3.a.5.8.8.b.d.0.1.0.0.2.ip6.arpa
PTR Record: server.company.net
Note: Full expansion required before nibble reversal
IP Address: fe80::1%eth0
Expanded: fe80:0000:0000:0000:0000:0000:0000:0001
Reverse Name: 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.e.f.ip6.arpa
PTR Record: (typically not configured)
Note: Link-local addresses rarely have reverse DNS
IPv6 Complexity
IPv6 reverse DNS names are much longer than IPv4 because each hex digit becomes a separate label. A single IPv6 address creates a 72-character reverse DNS name!

Practical Examples and Tools

Command Examples

CommandDescriptionExpected Result
dig -x 8.8.8.8Query reverse DNS for 8.8.8.8dns.google.
dig PTR 8.8.8.8.in-addr.arpaDirect PTR query (same as above)dns.google.
dig -x 2001:4860:4860::8888IPv6 reverse DNS querydns.google.
nslookup 1.1.1.1Windows/generic reverse lookupone.one.one.one.

Common Use Cases

  • Email servers checking sender reputation
  • Web server logs showing hostnames instead of IPs
  • Security tools identifying suspicious connections
  • Network troubleshooting and asset identification
  • Compliance auditing and documentation

Troubleshooting Common Issues

No reverse DNS record found

Causes: PTR record not configured, Wrong delegation, DNS server issue

Solutions: Check with IP provider, Verify PTR record exists, Test different DNS servers

Reverse DNS doesn't match forward DNS

Causes: Misconfigured PTR record, Stale DNS cache, Wrong hostname

Solutions: Verify PTR points to correct name, Clear DNS cache, Check forward/reverse match

Email being rejected due to missing rDNS

Causes: Mail server missing PTR record, PTR doesn't match HELO name

Solutions: Configure PTR record with ISP, Ensure PTR matches mail server name

Best Practices

  • Always configure reverse DNS for mail servers
  • Use meaningful hostnames in PTR records
  • Ensure forward and reverse DNS match
  • Keep PTR records up to date when changing hostnames
  • Test reverse DNS from multiple locations
  • Document your reverse DNS naming convention

Quick Reference & Tools

IPv4 Quick Examples
192.0.2.1 → 1.2.0.192.in-addr.arpa
10.0.0.1 → 1.0.0.10.in-addr.arpa
Use 'dig -x' for easy reverse lookups
IPv6 Quick Examples
2001:db8::1 → 1.0.0.0...8.b.d.0.1.0.0.2.ip6.arpa
Each hex digit gets its own label (nibble format)
Much longer than IPv4 reverse names

Useful Tools

dig -x
Command-line reverse DNS lookup
nslookup
Cross-platform DNS lookup tool
host
Linux/Unix DNS lookup utility
Online reverse DNS tools
Web-based lookup services