AdGuardHome icon indicating copy to clipboard operation
AdGuardHome copied to clipboard

Better detection of static IPs for DHCP server

Open ainar-g opened this issue 4 years ago • 3 comments

Currently, AGH uses simple parsers for OS-specific network interface configuration files to detect whether or not an IP is static and other properties. But OS differ in what they support in these files and also there can be different ways to set up networking within a single OS (for example, Linux with its NetworkManager, networkd, etc.). We should at least attempt to get this information from the OS directly where it is supported.

ainar-g avatar Sep 22 '21 14:09 ainar-g

@EugeneOne1, following #5004, please investigate if there is an easy way to get that at least from systemd.

ainar-g avatar Oct 06 '22 11:10 ainar-g

After a shallow investigation it appears there is no centralized and the only-right way to determine if the interface is configured to have a static IP. However, we may kind of get this info by parsing the output of the ip command, asssuming that interfaces configured with DHCP have the "dhcp" label in the related output.

EugeneOne1 avatar Oct 06 '22 12:10 EugeneOne1

I had the same problem (adguardhome-dockerized, Version: v0.107.18). I was thrown off by the [Check for DHCP servers] button which threw this error. In the end it turned out that I could just click the [Enable DHCP server] button and that worked fine.

May I suggest changing the error message so it does not appear to be a blocking issue.

Waldorf3 avatar Nov 20 '22 12:11 Waldorf3