arpaname
Translate IP address to hostname
TLDR
Translate IP addresses (IPv4 and IPv6) to the corresponding ARPA name
SYNOPSIS
arpaname [hostname]
PARAMETERS
hostname
IPv4 address or in-addr.arpa name to convert (optional; reads from stdin otherwise)
DESCRIPTION
The arpaname command is a lightweight utility designed to translate between IPv4 addresses in dotted decimal notation and their corresponding reverse DNS names in the in-addr.arpa domain.
It is invaluable for DNS administrators creating PTR records, scripting zone files, or automating network documentation. For example, inputting an IP address produces the fully qualified ARPA name needed for reverse lookups, while an ARPA name converts back to the IP.
The tool processes a single hostname argument or reads from standard input, outputting to stdout. This stdin/stdout behavior enables easy integration into pipelines or shell scripts. It exclusively handles IPv4; IPv6 requires alternative tools like ip6.arpa equivalents.
arpaname ensures proper formatting with reversed octets and a trailing dot on ARPA outputs, adhering to RFC 1035 standards for reverse DNS.
CAVEATS
IPv4 only; no IPv6 support. Always appends trailing dot to ARPA outputs. No error handling for invalid input.
EXAMPLES
arpaname 192.168.1.100
100.1.168.192.in-addr.arpa.
arpaname 100.1.168.192.in-addr.arpa.
192.168.1.100
echo '10.0.0.1' | arpaname
1.0.0.10.in-addr.arpa.
HISTORY
Part of the iputils package since early Linux kernels (1990s); developed by Alexey Kuznetsov for network utilities alongside ping and traceroute.


