I have 3 sonoff on/off plugs which are flashed with ESPHome (version 2024.3.0). Lately, on my Unifi networking devices (UDM Pro) I’ve been having issues with a non-managed IP space getting handled out (192.168.4.x). I’ve worked with unifi support and they said they have narrowed it down to 3 specific devices which are roque DHCP servers, which happen to be the 3 sonoff on/off devices running ESP home.
Does ESPHome run a dhcp server? I could see it if it was in AP mode, but not when it’s connected to an existing wireless network. Anyone run into this issue?
So, I went digging around the actual code (ESPHome: esphome::wifi::WiFiAP Class Reference) and I cannot find anything relating to any embedded DHCP server. Not that there isn’t one somewhere in the code, I just didn’t find it in my search.
Personally what I would do is give those 3 sonoff devices static IPs in some lower or upper range of your subnet and then change your DHCP address pool to be above/below those addresses. The other thing you can probably do is setup a firewall rule blocking UDP ports 67/68 to those three addresses. That should prevent them from trying to hand out IP addresses. I have quite a few of them running and they have never affected my DHCP pool on my UDM Pro. But, I also use 192.168.107.0 for all my IOT stuff so it doesn’t conflict with the 192.168.4.0 subnet.
The scorched earth approach to to move your 192.168.4.0 subnet to some other private address. lol
Agreed, but that’s only in AP mode. how would they hand out IP’s on a network they aren’t attached too. Its honestly what I was thinking also, but I don’t see how. Could they bridge, eg: be part of both networks? For now, I’ve just removed the devices from the network.