AdGuardHome
AdGuardHome copied to clipboard
Adguard DNS Issues when using Adguard DHCP and configuring Hostname in Static Lease
Have a question or an idea? Please search it on our forum to make sure it was not yet asked. If you cannot find what you had in mind, please submit it here.
Prerequisites
Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
- [Yes] I am running the latest version
- [Yes] I checked the documentation and found no answer
- [Yes] I checked to make sure that this issue has not already been filed
Issue Details
When configuring a DHCP static lease (mac 00:00:00:00:00:00 IP 182.168.1.5 Hostname LocalDevice) i am unable to ping or NS lookup using hostname
-
Version of AdGuard Home server:
- v0.107.6
-
How did you install AdGuard Home:
- Home Assistant (Docker)
-
How did you setup DNS configuration:
- Using Adguard DNS
-
If it's a router or IoT, please write device model:
- Windows PC running Debian used specifically for Home Assistant
-
CPU architecture:
- AMD64
-
Operating system and version:
- Debian 5.10.46-5
Expected Behavior
Ping LocalDevice should resolve to 192.168.1.5Actual Behavior
Receive error ping: LocalDevice: Name or service not knownScreenshots
Screenshot:
Additional Information
@ElGranPepo, hello. To configure a static lease you'll need to specify the real MAC address of the device. It won't receive the lease otherwise. If that worked?
Correct I have about 25 devices added in my DHCP reservations list, all with correct Mac addresses and !Ps
example was given
Well, also to perform a lookup by the device's hostname the request should be for device-hostname.lan
domain, where lan
is the TLD configured via AdGuardHome.yaml
file, the dhcp.local_domain_name
field (lan
by default).
Also, if the devices you're requesting have received their leases (those should have an access to the Internet)?
devices are not responding either with .lan or without. devices are correctly connecting to internet and are receiving filtering.
How exactly do you perform a lookup for the devices? Could you please provide a dig
/nslookup
command? Also, how does query log shows these requests?
From windows 10 PC Command line for testing.
C:\Users\User>ping myq Ping request could not find host myq. Please check the name and try again.
C:\Users\User>ping myq.lan Ping request could not find host myq.lan. Please check the name and try again.
C:\Users\User>nslookup myq Server: UnKnown Address: 10.1.1.x
*** UnKnown can't find myq: Non-existent domain
C:\Users\User>nslookup myq.lan Server: UnKnown Address: 10.1.1.x
*** UnKnown can't find myq.lan: Non-existent domain
from system running adguard (debian)
/usr/share/hassio/addons/data/a0d7b954_adguard/adguard$ ping myq ping: myq: Name or service not known /usr/share/hassio/addons/data/a0d7b954_adguard/adguard$ ping myq.lan ping: myq.lan: Name or service not known /usr/share/hassio/addons/data/a0d7b954_adguard/adguard$ nslookup myq Server: 10.1.1.x Address: 10.1.1.x#53
** server can't find myq: NXDOMAIN
/usr/share/hassio/addons/data/a0d7b954_adguard/adguard$ nslookup myq.lan Server: 10.1.1.x Address: 10.1.1.x#53
** server can't find myq.lan: NXDOMAIN
10.1.1.x is correctly showing as Adguard Home
dig from system running adguard (debian)
; <<>> DiG 9.16.15-Debian <<>> /nslookup ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 40177 ;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;/nslookup. IN A
;; AUTHORITY SECTION: . 1071 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2022050500 1800 900 604800 86400
;; Query time: 8 msec ;; SERVER: 10.1.1.x#53(10.1.1.x) ;; WHEN: Thu May 05 10:20:43 EDT 2022 ;; MSG SIZE rcvd: 113
thank you
@ElGranPepo, thanks for the details. AGH should respond for *.lan
with NXDOMAIN
in three cases:
- the AGH's DHCP server is disabled and the upstream responds with
NXDOMAIN
; - the requestor's IP address isn't within the private range (RFC 6303). If you have custom
dns.private_networks
, please insure your requesting machine is within at least one of those; - the hostname isn't leased by AGH.
If all of the above is true then could you please collect verbose log for us? Possibly with a couple of similar requests performed. Thanks.
So in my case:
- AGH's DHCP server is enabled and the devices in question are receiving their IP AND hostname from it
- my address is 10.1.x so I think im good here
- confirming what this means. if the hostname is being provided by the DHCP server as part of a reservation doe that invalidate it?
@ElGranPepo, so, I think, we'll need you to collect the log. You may send it to [email protected] with the issue number in the subject.
I had a similar issue after a new install (Debian 11). On restart of the host and a refresh of the AdGuard page this issue did not occur again.
No response for over a year; closing.