diff --git a/.gitignore b/.gitignore index 11f4f4d..0cd5d52 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ *.deb *tar.gz md5sums -files/ +./files/ diff --git a/coredns/files/etc/coredns/Corefile b/coredns/files/etc/coredns/Corefile new file mode 100644 index 0000000..30eaeef --- /dev/null +++ b/coredns/files/etc/coredns/Corefile @@ -0,0 +1,9 @@ +# Default Corefile, see https://coredns.io for more information. + +# Answer every below the root, with the whoami plugin. Log all queries +# and errors on standard output. +. { + whoami # coredns.io/plugins/whoami + log # coredns.io/plugins/log + errors # coredns.io/plugins/errors +} diff --git a/coredns/files/lib/systemd/system/coredns.service b/coredns/files/lib/systemd/system/coredns.service new file mode 100644 index 0000000..eab9aed --- /dev/null +++ b/coredns/files/lib/systemd/system/coredns.service @@ -0,0 +1,20 @@ +[Unit] +Description=CoreDNS DNS server +Documentation=https://coredns.io +After=network.target + +[Service] +PermissionsStartOnly=true +LimitNOFILE=1048576 +LimitNPROC=512 +CapabilityBoundingSet=CAP_NET_BIND_SERVICE +AmbientCapabilities=CAP_NET_BIND_SERVICE +NoNewPrivileges=true +User=coredns +WorkingDirectory=~ +ExecStart=/usr/bin/coredns -conf=/etc/coredns/Corefile +ExecReload=/bin/kill -SIGUSR1 $MAINPID +Restart=on-failure + +[Install] +WantedBy=multi-user.target