Theme
Aa
← man.tcos.us gopher root · man.tcos.us
lu: · ·
HEE-DNS(1)                         HEE Tools                         HEE-DNS(1)

NAME
       hee-dns - generate BIND zones from one flat host file.

SYNOPSIS
              hee-dns generate HOSTFILE --out DIR
              hee-dns check HOSTFILE
              hee-dns help | --help | -h

DESCRIPTION
              hee-dns generate HOSTFILE [--out DIR]   write forward + reverse zones
              hee-dns check    HOSTFILE               parse and report, write nothing
              hee-dns help                            this page

EXIT STATUS
              0   the host file parsed; zones written (generate) or reported (check)
              1   usage error -- unknown subcommand, or generate without --out
              2   the host file has a malformed record; nothing was written

              A duplicate-PTR warning does NOT change the exit status. It is a
              judgement call, not a parse error: two `=` records on one address is
              legal and occasionally deliberate.

EXAMPLES
              $ hee dns check tests/fixtures/dns/hosts.txt   # ci

              check parses the host file and reports, writing nothing. generate --out
              writes zone files and is left unmarked.

WHY THIS EXISTS
              lab.tcos.us had sixteen A records and zero PTR records. Not through
              neglect -- through structure. BIND wants a forward zone and a separate
              reverse zone, both maintained by hand, and the second one loses. Spencer,
              2026-09-02: "make forward, make backward too (unless reason)".

              So the rule is encoded in the source rather than remembered. The host file
              is tinydns's format, whose first character says which directions a record
              gets:

                  =name:ip:ttl    A and PTR      -- a real machine
                  +name:ip:ttl    A only         -- a vhost on a shared proxy
                  ^rev:name:ttl   PTR only       -- an address in this network whose
                                                    name lives in ANOTHER zone
                  @zone::mx:dist:ttl             -- MX

              "Unless reason" is the `+`. Eight names in this lab point at haproxy; an
              address gets ONE PTR naming the machine, not every vhost it fronts.

              `^` is tinydns's PTR-only record: `rev` is the full reverse name
              (72.0.0.10.in-addr.arpa) and `name` the machine it answers with. It is for
              a machine on this network that is named outside this zone -- an `=` there
              would put an A record for it inside lab.tcos.us under the wrong name.
              Spencer, 2026-09-16, of 10.0.0.72: "nuc-1.crooked.tcos.us (never lab)":

                  ^72.0.0.10.in-addr.arpa:nuc-1.crooked.tcos.us:300

              The format was chosen for a second reason: it is already djbdns-native. If
              this lab ever swaps BIND for tinydns the source file is the input, not a
              migration.

              SERIAL NUMBERS are YYYYMMDDnn, bumped against whatever is already deployed
              so a regeneration on the same day does not go backwards -- a stale serial
              is silently ignored by secondaries, which is the classic way a zone update
              "succeeds" and changes nothing.

                                                                     HEE-DNS(1)