/t/ip/rdns/ PTR & A Record Generator
Paste hostnames and addresses, get BIND PTR records — or the forward
A / AAAA records — relative to your $ORIGIN.
Locally Crunched, Like always :3
A prefix (192.0.2.0/24, 192.0.2,
2001:db8::/48) or an .arpa name. Remembered in this
browser, so you only set them once.
A domain (example.com).
Remembered in this browser, separately from the reverse zones.
Findings
What it accepts
Each line is searched for one IPv4 or IPv6 address and one hostname, in
either order — 192.0.2.10 host.example.com,
host.example.com,192.0.2.10, an /etc/hosts line,
whatever. Comments after ; or # are ignored.
Zone files work too. Lines with an A or
AAAA record use their owner name (an indented line inherits the
one above, @ means the origin), and relative names are
completed from the $ORIGIN lines in the pasted text.
PTR records are read the other way round — the owner is the
address — so a reverse zone can be turned back into A records, or
re-sorted into other reverse zones. Every other record type is skipped.
Forward writes an A or AAAA record per
name and address, sorted by name, each in the most specific forward zone
it falls in. Several addresses for one name are all kept. A short name
with no domain (web1) and no $ORIGIN above it is
not guessed at — it goes in a separate “no domain” block, as written.
Reverse puts each record in the most specific reverse zone it falls in, and each
zone gets its own block with a $ORIGIN header and owner names
relative to it. A prefix that is not on a zone boundary is split into the
zones it covers — /22 becomes four /24 zones,
2001:db8::/30 four /32s. Anything longer than
/24 uses its enclosing /24, since classless
delegation is not handled.
Records outside every zone are collected in a last block, written fully qualified. Leave the zones empty to get everything that way.
Index of /t/ip/rdns/
../ rdns.js 01-Nov-2026 11:07 27 KB