Why can't my DNS server start (bad zone error)?

Solution 1:

Assuming you've kept the whitespace of the zone files intact when reformatting them in your question, it appears that you have no NS record at the top of the zone due to a formatting problem, which makes the zone bogus. You'll also want to correct the corresponding A record for that nameserver.

  • What you typed: IN NS ns1.gallactica.lab.
  • What you intended it to be interpreted as: 1.168.192.in-addr.arpa. IN NS ns1.gallactica.lab.
  • How it was actually interpreted: IN.1.168.192.in-addr.arpa. IN NS ns1.gallactica.lab.

When a line begins as whitespace, it's assumed that the label (name of the record) is the same as the previous record in the zone. This makes for useful shorthand, but creates portability problems when the leading whitespace is lost between copy and pastes.

As a side-note, it's useful to run named-checkzone when encountering problems such as this. (and following any zonefile modification, really)