Knot, kresd with /etc/hosts




how can I configure TO with its default knot/kresd to load AND SERVE entries from /etc/hosts.
with list hostname_config ‘/etc/hosts’ in /etc/config/resolver I couldonly achieve to resolve it from the tourer but I want to resolve it also form my PC connected to it (or any other device on the network)


That hostname_config option should work fine. Without the option the file just used locally by libc (i.e. takes only effect on the router itself), with the option it affects also the DNS served.

I assume you did restart the resolver, and the PC does ask it for DNS (not using some other source), etc.


Hmm, you are right, the router seems to serve it because it works if I nslookup it specifially via the router on my PC:

$ nslookup turris

Non-authoritative answer:
Name: turris

But for some reason it does not work by default (without specifiying the router IP):

$ nslookup turris

** server can’t find turris: SERVFAIL

although I set up my eth0 network settings in NetworkManager to use DNS resolver with

$ nmcli dev show | grep DNS
IP6.DNS[1]: fd48:49f0:ee01::1

What could be wrong?
Thanks for your feedback


Maybe a bit “old school” in times of NetworkManager, but /etc/resolv.conf points to your configured nameserver ( as well? :wink:


yes, but I would rather like to make it work via NetworkManager if possible, otherwise my settings in networkmanager gui wouldnt work. Also I am really curious what the hell this problem is


Did you use an older ubuntu release? If I remember right, they have used a bogus ‘systemd-resolved’ service which listens on “” … google is your friend! :wink:

Good luck!


No, it is the latest Ubuntu LTS: Ubuntu 18.04.2 LTS should be not bogus, it is your localhost for dnsmasq, that is caching requests/responses.

For my problem I have also found this recently:

it seems it is about the short name problem, however I added lan as my search domain and it does not work, but using the lan extension it does not even work from the router, only without it:

[root@turris:~]# nslookup turris

Name: turris
Address 1:
*** Can’t find turris: No answer

[root@turris:~]|# nslookup turris.lan

** server can’t find turris.lan: NXDOMAIN
** server can’t find turris.lan: NXDOMAIN


I don’t see any advantages in such cascading DNS setups. I use unbound or kresd as central caching resolver in my (test) network, propagated via DHCP - without further DNS services on the clients.