Recently our old router died and we got a loaner from a friend. It’s an older TP-Link Archer C2. I’ve been trying to set my custom DNS servers within openwrt, to use AdGuardHome.
AGH is running as an add-on within Home Assistant on a RaspberryPi 4. In our old router I had set our DNS to the ip-adressess AGH uses, but in OpenWRT I can’t seem to get it to work.
If you want to simply advertise the Pi via DHCP to the client devices, you can set option 6 in the lan DHCP server settings.
Alternatively, you can keep the router as the DHCP advertised DNS and then set the router itself to use the Pi for DNS.
Client devices can override this, of course, so if you need to block alternate DNS servers, you can use the firewall to hijack and redirect the DNS to your Pi. This is useful if your users are going to try to outwit you and/or if the client devices have hardcoded/preferred DNS servers that you want to override; it is not always necessary, though... depends on your situation.