When setting up your Omnia Turris, you can define a TLD for your local network.
Typically this is “lan”.
You can also configure the hostnames of the devices getting a DHCP lease to be inserted into the DNS records of the local resolver.
This is fantastic, however I noticed that unfortunately the hostname of the omnia turris itself is left out.
So if the hostname of my Omnia Turris, is the default “turris”, I cannot ping it using turris.lan
I know I can configure this manually by configuring d̶n̶s̶m̶a̶s̶q̶ knot, but this seems like a small improvement which could be added automatically based on the chosen hostname of the router and it’s configured local lan network.
For reference, here’s how to add static address records into DNS on Omnia – it’s not about dnsmasq as that isn’t used for DNS by default (should work the same on MOX as well, I believe).
I have an AP that i can access by ap.lan so i would also liek to have router.lan/omnia.lan/turris.lan or whatever based on the hostname. And i vote +1 to add it as default cnfiguration.
I know I can switch to dnsmasq adn it will work OOB but I still want knot and dns forwarding.
How to achieve that?
Edit:
I can ping all the devices from lan dhcp via hostname.lan but not omnia itself;(
Yeah i have it in /etc/hosts
192.x.x.x omnia omnia.lan
But its resolving only from omnia. And what I want is to go on web browser and just type omnia.lan and go to luci thing. I want this to be served with other dynamic/static dhcp clients hostnames;( All of them work client-to-client but not the router itself from the client.
Explanation client.lan can ping client2.lan. omnia can ping client/client2.lan none of the clients can ping omnia/omnia.lan
This is unrelated to LuCi → Network → Hostnames. Add turris there without „.lan“ and it should work, as I suggested… On clients, too…
There is some script that checks this LuCi config and integrates it into kresd config if I remember it correctly, but I don‘t remeber the details. Ask turris people if you want details. But it works as I described (At least in Turris OS 3.X)
Yeah I had that checked already but it enables CLIENTS in dns not server as well.
I also tried including /etc/hosts in kresd and restarting kresd manually and resolver to be sure. Didn’t work right after. There is some cache thing going on there.
And then I simply rebooted and now it just works. I tried many solutions so I am still not sure which one was the exact one. I need to check it out since I want to move to TOS4.0 soon and have that option there.
But I think it’s strictly luci/OpenWRT related not a Turris thing to worry about. Or is there any chance maybe that kresd is doing something in the middle that breaks that? @turristeam? Just to show off what I found out:
//everything as expected (obfuscated for privacy with black bars)
You can clearly see that accessing luci with routers hostname breaks AUTO REFRESH functionality of luci somehow. I have checked dmesg | syslog | /var/log/lighttpd/error.log there is nothing there.
It’s same config same everything just different browser tab. Will have to check if it’s fixed in OpenWRT18.x/TOS4.x if not then I will submit that bug upstream to investigate more. There is nothing in the logs.
Hi,
I reopen this thread, because of course i’have the same problem.
I found this : https://doc.turris.cz/doc/en/public/dns_knot_misc
Based on this, you can add all your static dns entries in your host file and add list hostname_config '/etc/hosts' in your resolv file or even better use another file like this your turris could have different record than the dns resolver …
After that it works like a charm
Create an entry in your Turris hosts file like this : 192.168.1.195 titi titi.lan
And you will able to ping it from everywhere in your lan …
If you don’t do this only dhcp static entries will be resolved in the lan …