On a Turris Omnia I wish to setup a private DNS server to resolve my internal home-lab DNS records to a private IP in the range of 192.168.10.0/24 such as
and more along with setting up DNS to my ISP to resolve internet routable DNS records such as google, facebook etc… via any open-source software available dnsmasq or bind9
Could someone please let me know if this is possible and the steps to do-so?
Yes. In reForis if you tick network / DNS / “Enable DHCP clients in DNS”, all DHCP-assigned names will be added into the default DNS. There you can also change the default suffix from lan to mydomain.com.
Please refer a sample diagram of my intended setup. Note the Desktop device would be the one from wherein I’d primarily perform CRUD operations on the DNS records that I’d like to be stored in the Turris Omnia Router under reForis
If the above is not possible natively in reForis, could I install any open-source software available like knot, bind9, unbound on the Turris Omnia Router to do so?
Turris Omnia runs Knot Resolver by default, and that’s what serves as the default DNS in LAN. The setting I posted just tweaks some script that feed additional data into it.
Yes. It is a resolver, but due to popular demand, there is some limited functionality to answer some records “authoritatively” – and that’s what is used here. Basically all resolvers can do it to some extent.
Yes, it could, but I’m not aware of anyone running authoritative DNS on Turris. It’s much more complex, e.g. you don’t have integration into DHCP by default. (I think the kea server has integration to DDNS commands.)
one forwarder’s IPv4 would be the Turris device’s own private IP (e.g: 192.168.10.1) containing the internal DNS records for my home-lab as an alternative to publishing them on a public DNS server
2nd forwarder could be either Cloudflare or Google DNS with TLS for public DNS queries.
Yes. In reForis if you tick network / DNS / “Enable DHCP clients in DNS”, all DHCP-assigned names will be added into the default DNS. There you can also change the default suffix from lan to mydomain.com.
Then I found the DHCP clients in DNS and the page for List of DHCP clients inline with your answer to understand how Knot resolver would form the internal DNS records using the Hostname.Domain of DHCP Clients in DNS fields such as test.mydomain.com and resolve it as well.
This negates the need of point 1 in the custom forwarder setup above but retain point 2.
However some caveats here:
For each connected client, I’ve to add hostname prefix as the desired sub-domain along with the Domain of DHCP Clients in DNS set to mydomain.com. This is ok if there are not too many clients.
All connected clients will have an IP address based on the Lease Time parameter in DHCP changing every 12 hours meaning their A record’s IP address will also change similarly. Basically these are dependent on the DHCP service running in the Turris.
Please let me know if I got the inner working of Turris Omnia’s DNS correctly.
I don’t know the DHCP parts well. It certainly can be further customized, but not in reForis really. Something in luci, or other general OpenWrt recipes.
By default the individual machines choose their own hostnames, and those appear with the configured suffix (.lan by default), at least if they follow reasonable patterns.
Indeed my point 1 of custom forwarder in my previous comment was exactly via ReForis itself, nothing else. Thanks for the heads-up on Google’s DNS, will review Quad9 and Cloudflare.
TL;DR of this thread:
Turris DNS’s default resolver is Knot DNS functioning both as a resolver + DNS server via the DHCP clients in DNS feature.
For each connected client to form a consistent DNS, the hostname prefix should be the desired sub-domain along with the Domain of DHCP Clients in DNS set to mydomain.com in the above feature itself.
All connected clients get an IP address based on the Lease Time parameter in DHCP meaning their corresponding A record’s IP addresses would be valid for a maximum of 12 hrs.
Subsequently, if we refer the List of DHCP clients as an example in conjunction with the above, we can deduce the following 3 DNS A records.
A bob.lan 5m00s 192.168.1.123
A alice.lan 5m00s 192.168.1.137
A peter.lan 5m00s 192.168.1.138
Again, thank you @vcunat for your guidance to help me understand this better. We could resolve this discussion thread if there’s no further pointers.