How to make local hostnames resolvable


I have Turris Omnia with set up DHCP.
Is it possible to set up resolving of local hostnames among the network?
Currently I can reach each other vian ip address provided by DHCP, but resolving via hostnames doesn’t work.
I’ve put resolving in /etc/hosts

Thanks in advance,


I expect you don’t want to hand-manage /etc/hosts and instead want .../foris/config/main/dns/ “Enable DHCP clients in DNS”.

I worked, thank you for fast and accurate answer.

I’m using OS 4.0.

What does this Foris setting actually do? Does it require a restart of the router? In v3, I needed to use port 5353 for this.

Should I be able to ping/access another host by the hostname.lan as listed in the Active DHCS Leases?


This didn’t work from my Mac:

$ ping bilbo.lan
ping: cannot resolve bilbo.lan: Unknown host

I see this option in Luci’s DHCP and DNS settings:


Does this have an effect?

Luci’s “DHCP and DNS” configures dnsmasq, which is not used for DNS on Turris.

So, dnsmasq is only used for DHCP? That would explain why its service is enabled and running. As I recall reading, setting the dnsmasq's port to 0 disables the DNS. Is this correct?

What is being used for DNS, in TOS v4? The kresd service has been disabled. I also see that the resolver service is running. What is the difference between these two?


If I look right, the “resolver” service is more generic, and on Omnia or MOX it should be starting kresd process by default.

As you saying that the resolver service will start the kresd service (as seen in the Startup section)? I do see a kresd instance in the processes, however:

/usr/bin/kresd -c /tmp/kresd.config -f 1 /tmp/kresd -a 53 -a :: 53 -k /etc/root.keys

.lan name resolution is now working (it wasn’t after I enabled the DHCP clients in DNS setting in Foris). Is there a delay between enabling this setting and the name resolution functioning? The router itself, hostname = turris, in the is NOT available at turris.lan. Is this expected?

It would be nice to include some of these specific in the new, official documentation: DNS - Turris Documentation.

I don’t think there should be, but I’m not sure. Starting another kresd process shouldn’t help that issue anyway; if you have multiple of them, each query will be pseudo-randomly directed to one of the processes.

Apparently that’s a relatively common complaint. In any case, you can add arbitrary custom names: Turris Documentation

It appears that /etc/hosts different than Luci > Network > Hostnames. Where is the latter persisted? Is it used by dnsmasq, not resolver/kresd?

This has been helpful.

I think it’s used by DHCP server, but I haven’t really looked into that, so I don’t really know. If that’s so, I’d expect them to get propagated to DNS in the moment DHCP assigns them.

I added a dummy value:

It was added to /etc/config/dhcp in the domain section:

config domain
	option ip ''
	option name 'foo_bar_baz'

The change was immediate:

User@MacBookPro $ ping foo_bar_baz
PING foo_bar_baz.lan ( 56 data bytes
64 bytes from icmp_seq=0 ttl=64 time=0.265 ms
64 bytes from icmp_seq=1 ttl=64 time=0.517 ms
64 bytes from icmp_seq=2 ttl=64 time=0.458 ms