How to setup .lan/.local for connected clients

I thought this would work by default but none of the connected clients are available at .lan/.local domains. What should be the setup or could you point me to any guide?

If I understand it correctly when Turris Omnia is running as DHCP server it’s not accessible at “turris.local”. Can I make it so?

https://doc.turris.cz/doc/en/public/enable_dot_lan_domain

TOS leverages a glue script that automatically generates reverse DNS records for the resolver kresd | unbound and thus router clients should be accessible accordingly.

That said the glue script works only with dnsmasq as DHCP server and neglects odhcpd however.
Moreover, OpenWrt (and subsequent TOS) deploys a hybrid DHCP server setup out of the box:

  • dnsmasq for DHCPv4
  • odhcpd for DHCPv6

It is possible however to utilise either, dnsmasq or odhcpd entirely for both DHCPv4|6.

If not mistaken the governing entries in /etc/config/dhcp for dnsmaq should be something like:

option local '/to.lan/'
option domain 'to.lan'

Yes, as noted on the link above, you “only” need to click a checkbox in Foris / DNS. You can also change the suffix from .lan in there, but .local is probably better avoided because it’s reserved for mDNS (a bit different protocol than DNS).

At least for basic functionality. IIRC the checkbox won’t give name to the router itself and won’t assign IPv6, if you do care about those.

Not sure if it does perhaps when dnsmasq is also handling DHCPv6 instead of odhcpd, because as far I can tell it does not work since

I can say the kresd side is fine, it’s just the glue script not putting IPv6 data in. It’s not a priority to fix, I suppose – I can’t immediately think of any notable advantages of IPv6 within a small LAN (contrary to using it for farther connections).

I would not reckon that LAN prefix size matters (it does not matter for IPv4 either) but the benefit being in general the same as for IPv4, reverse hostname resolution for a local domain within private address space (ULA).


Suppose not, considering the backlog label [1]


[1] https://gitlab.labs.nic.cz/turris/turris-os-packages/issues/311

1 Like

From Turris Documentation:

Older firmwares do not support zero-conf, so you have to use IP address. Newer ones starting Turris OS 4.0 do, so you might be able to use http://turris.local.

However, I was never able to access the router (running Turris OS 4.0.3) using such URL!

Oh, there’s (an attempt to have) a mDNS service on Turris by default… all the more reason to avoid using .local in DNS protocol as well. I know know little about mDNS, so I can’t really help you with turris.local.

The router’s local IP tends to be fixed, so you can add a static record manually (say, turris.lan). There are threads for that here, e.g. Cannot resolve hostname turris itself

1 Like

@vcunat What checkbox? It isn’t really clear to me.

Thanks, that worked.

Foris GUI / “DNS” tab / “DHCP clients in DNS”. Docs: https://docs.turris.cz/basics/foris/dns/foris-dns/#dhcp-clients-in-dns

1 Like