Next: Slave configuration, Up: Knot DNS Configuration [Contents][Index]
The following configuration presents a minimal configuration file which can be used as a base for your Knot DNS setup.
# This is a sample of a minimal configuration file for Knot DNS. # # For exhaustive list of all options see samples/knot.full.conf # in the source directory. # system { storage "/var/lib/knot"; } interfaces { my_interface { address 127.0.0.1@53; } second_int { address ::1; } } log { syslog { any notice, warning, error; } } zones { example.com { file "/etc/knot/example.com"; } }
Now let’s go step by step through this minimal configuration file:
system
statement we have configured storage
directory where Knot DNS will store slave zones and journal files.
(See system and storage)
interfaces
statement defines interfaces where Knot
DNS will listen for incoming connections. We have defined two
interfaces: one IPv4 called my_interface explicitly listening
on port 53 and second IPv6 called second_int also listening on
port 53, which is the default port for the DNS. See interfaces.
log
statement defines the log facilities for Knot DNS.
In this example we told Knot DNS to send its log messages with the severities
debug
, warning
and notice
into the syslog.
If you omit this sections, all severities will printed to
either stdout
or stderr
, and the severities
from the warning
and more serious to syslog. You can find all
possible combinations in the log.
zones
statement is probably the most important one,
because it defines the zones that Knot DNS will serve. In its most simple
form you can define a zone by its name and zone file.