.\" Generated by Mmark Markdown Processor - mmark.miek.nl .TH "DBFILE" 7 "August 2026" "atomdns handlers" "atomdns authors" .SH "NAME" .PP \fIdbfile\fP \- serve zone data from an RFC 1035\-style file .SH "DESCRIPTION" .PP The \fIdbfile\fP handler is used for DNS servers that serve from a file that loaded from disk, containing RFC 1035 styled data. If the zone file contains signatures (i.e., is signed using DNSSEC), correct DNSSEC answers are returned. Only NSEC is supported. See the \fIsign\fP handler if you want to sign and resign your zone automatically. .PP The server will reply with minimal responses by default. The \fIdbfile\fP handler will watch the zone file and when it receives a (kernel) notify it will reload the zone after 2 seconds. Regardless of any change it will send out notifies if configured to do so, the actual SOA serial isn't relevant. .SH "SYNTAX" .PP In it simplests form \fIdbfile\fP you can use: .PP .RS .nf dbfile FILE .fi .RE .IP \(bu 4 \fBFILE\fP the zone file to load. If the path is relative, the path from the global root config will be prepended to it. .PP If the handler block contains multiple zones, they all will use the \fIsame\fP \fBFILE\fP. And you must make sure that zone \fBFILE\fP is generic enough, i.e. use \fB\fC@\fR for origins instead of domain names. Note that this break incoming transfers and thus will lead to an error when attempted. .PP For extra control you can open the block and define multipe extra properties that deal with zone transfers. .PP .RS .nf dbfile FILE { transfer { from IP[:PORT] [IP[:PORT]]... { key NAME ALGORITHM SECRET } to [IP[:PORT]]... { notify IP[:PORT] [IP[:PORT]]... source IP|IFACE [IP|IFACE] key NAME ALGORITHM SECRET } } } .fi .RE .IP \(bu 4 \fB\fCtransfer\fR details how zone transfers are handled, \fB\fCfrom\fR deals with incoming AXFR from \fBIP\fP, and \fB\fCto\fR deals with outgoing ones. Without \fB\fCtransfer\fR all transfers are prohibited. When transfer from a secondary \fIall\fP SOA timers are ignored, every 10 time minutes the upstream(s) is(/are) check for SOA updates. .RS .IP \(en 4 \fB\fCfrom\fR allows for multiple upstream \fBIP\fPs to be specified, they will be tried in that order. Notifies from those servers will be matched against \fBIP\fPs. If \fB\fCfrom\fR is used \fImultipe\fP zones are disallowed, and will cause an error because the transferred zone cant be shared. To save the zone file the directory of \fBFILE\fP must be writeable. .IP \(en 4 The \fB\fCkey\fR specification is for TSIG signed transfers. The \fBSECRET\fP must be base64 encoded. .IP \(en 4 \fB\fCto\fR allows for multipe downstream \fBIP\fPs to be specified, those are all allowed to initiate a transfer. If there are no \fBIP\fPs specfied the AXFR is open to the entire internet. .IP \(en 4 If there is no \fB\fCnotify\fR the \fBIP\fPs as specified in \fB\fCto\fR are used for sending notifies. If you want to override this add a \fB\fCnotify\fR and put an (new) set of \fBIP\fPs there. There can be at the most two IPs here, one for IPv4 and one for IPv6. With \fB\fCsource\fR you can set the source(s) address when sending the notifies. You can use an interface name as \fBIFACE\fP and the routable IP address from the interface are also used. The TSIG key specification is identical to that of \fB\fCfrom\fR. For \fBIP\fP you can use IPv6 or IPv4 addresses, these are automatically matched up, i.e. a notify with a IPv4 address will use a IPv4 source and vice versa. .RE .PP Note that a bare \fB\fCtransfer\fR is enough to allow for outgoing transfers. .SH "EXAMPLES" .PP Load the \fB\fCexample.org\fR zone from \fB\fCdb.example.org\fR and allow transfers to the internet, but send notifies to 10.240.1.1 .PP .RS .nf example.org { dbfile db.example.org { transfer { to { notify 10.240.1.1 } } } } .fi .RE .PP Where \fB\fCdb.example.org\fR would contain RRs in the (text) presentation format from RFC 1035: .PP .RS .nf $ORIGIN example.org. @ 3600 IN SOA sns.dns.icann.org. noc.dns.icann.org. 2017042745 7200 3600 1209600 3600 3600 IN NS a.iana\-servers.net. 3600 IN NS b.iana\-servers.net. www IN A 127.0.0.1 IN AAAA ::1 .fi .RE .PP Or use a single zone file for multiple zones: .PP .RS .nf example.org example.net { dbfile example.org.signed { transfer { to 10.240.1.1 { source eth0 } } } } .fi .RE .SH "SEE ALSO" .PP See the \fIsign\fP handler for signing your zones and see RFC 1035 for more info on how to structure zone files.