Hi,
I am writing looking for some help with a setup where the local lan has
a machine with knot resolver and some of the hosts that are connected to
the LAN are ubuntu machines that by default use systemd-resolved as a
local caching stub resolver. For some reasons this combination appears
troublesome and I am trying to undestand all the reasons why.
One issue has already been identified as a systemd-resolved, in the
ubuntu focal version getting confused by a (correct) answer from kresd
(discussion on
https://gitlab.nic.cz/knot/knot-resolver/-/issues/686#note_234431).
Now, I find another issue in that I do not appear successful in making
systemd-resolved talk to kresd over tls. This would be important
because most of the ubuntu focal hosts are setup with systemd-resolved
using opportunistic tls. If systemd-thinks that there is a problem with
contacting the current DNS server via tls then it switches to the
fallback server and kresd ends up not being used at all.
If I use `resolvectl` to set the DNS of an ubuntu host to point to the
machine with kresd and I activate DNSoverTLS, then I get:
resolvectl query lwn.netlwn.net: resolve call failed: All attempts to contact name servers or
networks failed
Similarly, if I user resolvectl to set to use opportunistic DNSoverTLS,
things seem to work, but I see on the journal some messages about
Using degraded feature set UDP for DNS server
Thus, I'd be glad to get some pointer at how to check that DNS over TLS
works correctly with kresd and how to verify why systemd-resolved fails.
Thanks!
Sergio
Hi,
I am writing looking for some help with a setup where the local lan has
a machine with knot resolver and some of the hosts that are connected to
the LAN are ubuntu machines that by default use systemd-resolved as a
local caching stub resolver. For some reasons this combination appears
troublesome and I am trying to undestand all the reasons why.
One issue has already been identified as a systemd-resolved, in the
ubuntu focal version getting confused by a (correct) answer from kresd
(discussion on
https://gitlab.nic.cz/knot/knot-resolver/-/issues/686#note_234431).
Now, I find another issue in that I do not appear successful in making
systemd-resolved talk to kresd over tls. This would be important
because some of the ubuntu focal hosts are setup with systemd-resolved
using tls.
If I use `resolvectl` to set the DNS of an ubuntu host to point to the
machine with kresd and I activate DNSoverTLS, then I get:
resolvectl query lwn.netlwn.net: resolve call failed: All attempts to contact name servers or
networks failed
Similarly, if I user resolvectl to set to use opportunistic DNSoverTLS,
things seem to work, but I see on the journal some messages about
Using degraded feature set UDP for DNS server
Thus, I'd be glad to get some pointer at how to check that DNS over TLS
works correctly with kresd and how to verify why systemd-resolved fails.
Thanks!
Sergio
On 29/10/2021 16.59, Martin Dosch wrote:
> You're right. Although the certs are readable (and other services
> successfully read them already) it works after I created a script
> which copys the files into kresd's workdir and chowns them to
> knot-resolver.
Maybe those other services run as root user or something...
Dear all,
I am using knot-resolver for DNS over TLS (DoT) for a while now. So far
I let nginx handle the TLS part on port 853 and proxy the requests to
127.0.0.1:53. I wanted to simplify my setup and let knot-resolver do the
whole thing. But I am facing problems on my server (Debian Stable
Bullseye).
I can enable DoT on 853 successfully using without specifying certs but
I want to use my TLS certs created by certbot. Once I add the following
line kresd fails to start.
> net.tls("/etc/letsencrypt/live/mdosch.de/fullchain.pem",
> "/etc/letsencrypt/live/mdosch.de/privkey.pem")
Systemd shows me the following error:
> Oct 28 19:49:41 v220191283267104968 systemd[1]: Starting Knot Resolver daemon...
> Oct 28 19:49:41 v220191283267104968 kresd[22488]: [tls] gnutls_certificate_set_x509_key_file(/etc/letsencrypt/live/md>
> Oct 28 19:49:41 v220191283267104968 kresd[22488]: [system] error while loading config: error occurred here (config fi>
> Oct 28 19:49:41 v220191283267104968 kresd[22488]: stack traceback:
> Oct 28 19:49:41 v220191283267104968 kresd[22488]: [C]: in function 'tls'
> Oct 28 19:49:41 v220191283267104968 kresd[22488]: /etc/knot-resolver/kresd.conf:3: in main chunk
> Oct 28 19:49:41 v220191283267104968 kresd[22488]: ERROR: Invalid argument (workdir '/var/lib/knot-resolver')
> Oct 28 19:49:41 v220191283267104968 systemd[1]: kresd(a)1.service: Main process exited, code=exited, status=1/FAILURE
> Oct 28 19:49:41 v220191283267104968 systemd[1]: kresd(a)1.service: Failed with result 'exit-code'.
> Oct 28 19:49:41 v220191283267104968 systemd[1]: Failed to start Knot
> Resolver daemon.
The files are world readable so I don't know what's going on:
> ll /etc/letsencrypt/live/mdosch.de/
> total 4.0K
> -rw-r--r-- 1 certbot prosody 692 Jun 11 00:30 README
> lrwxrwxrwx 1 root root 38 Oct 27 22:07 cert.pem -> ../../archive/mdosch.de-0003/cert9.pem
> lrwxrwxrwx 1 root root 39 Oct 27 22:07 chain.pem -> ../../archive/mdosch.de-0003/chain9.pem
> lrwxrwxrwx 1 root root 43 Oct 27 22:07 fullchain.pem -> ../../archive/mdosch.de-0003/fullchain9.pem
> lrwxrwxrwx 1 root root 41 Oct 27 22:07 privkey.pem -> ../../archive/mdosch.de-0003/privkey9.pem
Also I don't understand why it complains about the workdir as I didn't
change anything regarding workdir but only pointed to the cert and key
file.
Do you have any idea what I am doing wrong?
Best regards,
Martin
Hi there,
is it actually possible to import a zone file for a locale zone
(yyyyy.xxxx.com.lan) or does it have to be done differently?
In any case, I can't figure out how to do it correctly!
Can someone help with an example i have had some problems with my local
domains since i switched to knot?
Can you actually import the domains from knot into the knot resolver?
I would like to have a stable DNS system on my servers again with knot & knot-
resolver I hope I "think" correctly, a 25 year "bind" damaged person ;-)
--
mit freundlichen Grüßen / best regards
Günther J. Niederwimmer