AdguardTeam / AdGuardHome

Network-wide ads & trackers blocking DNS server
https://adguard.com/adguard-home/overview.html
GNU General Public License v3.0
25.63k stars 1.84k forks source link

Request to add local domain name for public subnets #7313

Closed antoninchadima closed 1 month ago

antoninchadima commented 1 month ago

Prerequisites

The problem

When you set the local_domain_name — The domain name that AdGuard Home's DHCP server uses for hostnames of its clients. The default value, which is also set when this value is empty, is lan. So, if you have a machine called myhost in your network, and AdGuard Home is this network's DHCP server, the hostname of that machine is myhost.lan.

DNS queries of type A for such hosts are only allowed from locally served networks, such as 10.0.0.0/8, 192.168.0.0/16, and so on. Other clients receive an empty NXDOMAIN response.

But I'm using the DHCP server on a public subnet (with public IPs). When i set the local_domain_name with the actual public domain name, then all DNS request for the DCHP names and specially the dns names for DHCP static leases (servers) are not resolved and the DHCP clients get an empty NXDOMAIN response.

Proposed solution

Please add a optional toggle for enabling of resolving the DHCP names with public domain names on public networks. And maybe a input box allowing to specify which networks are allowed to get a proper response for the A queries on those DHCP names with the attached local domain name.

Alternatives considered and additional information

Thanks in advance

antoninchadima commented 1 month ago

ok i will try tu setup this with the private_networks option it is not so well documented - but i will try

antoninchadima commented 1 month ago

seems to be working