-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DHCP: automatic hostnames #1956
Comments
Quick question -- do you use AdGuard's DHCP server? I mean most likely you do, but you didn't state it anywhere. |
@ameshkov yes, I do. |
@szolin do you remember why we limited resolution to static leases only? It sounds perfectly okay to do this for dynamic leases as well. |
It's not implemented. We implemented support for PTR requests only - #1682 |
#1956 Squashed commit of the following: commit efeacd9 Author: Simon Zolin <[email protected]> Date: Tue Aug 18 13:54:15 2020 +0300 * DNS: resolve host names from DHCP: improve . Require a valid host name from DHCP lease . Use lower-case names
Problem Description
I switched from Pi-hole to AGH recently. Everything was seamless apart from a surprising issue with hostnames. I previously relied on Pi-hole's automatic hostnames to avoid needing to set up static leases on the DHCP server.
For example with Pi-hole my iPhone named "Alec's iPhone" would automatically be available at
alecs-iphone.lan
without a static lease. The device would receive a new IP occasionally but always be available atalecs-iphone.lan
.To achieve this with AGH it seems I have to do two things for each device:
Set up a DHCP static lease. This wasn't necessary on Pi-hole and in some ways defeats the purpose of what I'm trying to achieve. This AGH lease requires a "Hostname" which I originally thought I would be able to ping but it appears not. I'm not sure where this "Hostname" is actually used.
Add a custom filtering rule like below. It appears this is where the hostname is actually defined, allowing me to
ping alecs-iphone.lan
. But it also means that any requests through this rule show as "blocked" in my stats.The two required steps for each device and their drawbacks makes trying to achieve my goal not really worth it in AGH, since each device needs a static lease anyway so there's a fixed IP to use. And the impact to the stats make them basically useless (says over 50% of all queries were blocked etc.).
Proposed Solution
If AGH automatically created resolvable hostnames from the names of devices like Pi-hole that would allow me to remove my static leases and custom filtering rules.
If AGH gave some way to change these device names and the underlying hostname without setting a static lease for the device (similar to how you can name devices in your router) then it would be far better than Pi-hole, and afaik basically make static leases redundant if you only used the hostname to communicate with the device.
Alternatives Considered
The closest similar request I could find is #783, but not sure this is a duplicate of that.
Additional Information
I am running the AdGuard Home Home Assistant Community Add-on so don't have easy access to the filesystem to create a file for listing these. And the point of this issue is that a list in a hosts file that needs to be manually maintained shouldn't be necessary.
The text was updated successfully, but these errors were encountered: