Knot

From Segfault
Jump to: navigation, search

Installation

If no distribution packages are available[1], we can compile Knot DNS from source:[2]

git clone https://gitlab.labs.nic.cz/knot/knot-dns.git knot-dns-git
cd knot-dns-git

sudo dnf install gnutls-devel userspace-rcu-devel libedit-devel

./autogen.sh
./configure --prefix=/opt/knot --disable-documentation
make && sudo make install

Configuration

Minimal configuration to get things going:

$ cat knot.conf
server:
   # Listen on all configured IPv4 interfaces.
   listen: 0.0.0.0@53
   # Listen on all configured IPv6 interfaces.
   listen: ::@53
   # User for running the server.
   user: knot:knot

log:
   # Log info and more serious events to syslog.
 - target: syslog
   any: info

zone:
  - domain: example.net
    storage: "/etc/knot"
    file: "example.net.zone"

Note: both rundir and storage need to be writable by the user!

Zone file:

$ORIGIN example.net.
$TTL   7d

@              SOA     www.example.net. root.example.net. (
                        2018020501     ; Serial
                                7d     ; Refresh
                                1d     ; Retry
                               28d     ; Expire
                                7d )   ; Negative Cache TTL

               NS      ns1
               NS      ns2
               MX      10 mx.example.net

www            A       93.184.216.34
               AAAA    2606:2800:220:1:248:1893:25c8:1946

mx             A       93.184.216.34
               AAAA    2606:2800:220:1:248:1893:25c8:1946

ns1            A       93.184.216.34
               AAAA    2606:2800:220:1:248:1893:25c8:1946

ns2            A       93.184.216.34
               AAAA    2606:2800:220:1:248:1893:25c8:1946

example.net.   A       93.184.216.34
               AAAA    2606:2800:220:1:248:1893:25c8:1946
;              CAA 128 issue "letsencrypt.org"

Note: CAA records are only supported in Knot DNS 2.2.0 and later.[3]

Links

References