TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
3.84k stars 400 forks source link

hosts file support #789

Closed mailinglists35 closed 4 months ago

mailinglists35 commented 7 months ago

I've been searching the admin interface and the documentation but haven't been able to find a reference to the OS hosts file. Usually dns resolvers have this feature and sometimes authoritative dns servers too (dnsmasq, for example).

if my conclusion is right, is there any chance in the future TDNS can have the feature of reading and serving both unqualified and fqdn entries defined in the OS hosts file, when used as a resolver? or is it really only an authoritative server with no resolver component?

thanks

ShreyasZare commented 7 months ago

Thanks for the post. The DNS server does not support OS hosts file and there is no plan to add support for it. The hosts file is used only by the client OS and DNS stub resolvers like dnsmasq or systemd-resolved but not proper authoritative DNS servers.

Its recommended to not use hosts file when you have DNS server on your local network. You can just create a primary zone for your local network and add records as needed. Even better option is to configure your DHCP server with domain name option and it will automatically create records in your DNS server when an IP address is assigned to a client.