Based on your comment:
Actually, I use this directive: $INCLUDE /usr/local/etc/nsd/zones/forward/COMMON
. I want to have in a common file things like SOA and NS, MX records, which are the same for all the zones/subzones
Where my first response is that setting the SOA record in a master include file is a bad idea as that means that all your DNS zones will have the same version number and an update to one will require reloading all zones.
The use of the $INCLUDE directive is established in RFC 1035 and one of the design goals nsd
is to be completely RFC compliant.
Unless you're running into a simple error in the file-system permissions it seems likely you're running into the requirements that are set in RFC 1035 section 5.2 for include (master) files and zone files:
- All RRs in the file should have the same class.
So having both NS and MX records in the same include file seems forbidden.
- Exactly one SOA RR should be present at the top of the zone.
Setting the SOA record in an $INCLUDE file appears to be forbidden as well.
- If delegations are present and glue information is required,
it should be present.
Apparently glue records are allowed so NS
and specific A
records can be combined in a single include file...
- Information present outside of the authoritative nodes in the
zone should be glue information, rather than the result of an
origin or similar error.