Use Adguardhome as DHCP server

I attempting to setup my banana pi R3 with adguarhome. I have succeeded in following the instructions here. Can anyone give me advice or point me to instructions on how to also make Adguardhome the DHCP server and safely turn off DHCP from openwrt? My motivation is that I want to be able to set filters via MAC address's in adguardhome. And I need Adguardhome to be responsible for DHCP and DNS. They have documentation here Adguardhome DHCP settings on the settings for adguardhome. But I am trying to figure out how to turn off DHCP in openwrt and turn it on in Adguard. My first attempt did not go well. I edited the /etc/adguardhome.yaml file and made these settings:

  enabled: true
  interface_name: br-lan
  local_domain_name: lan
    lease_duration: 86400
    icmp_timeout_msec: 1000
    options: []
    range_start: ""
    lease_duration: 86400
    ra_slaac_only: false
    ra_allow_slaac: false

Then I went into Luci and made the following changes to turn off DHCP:

Network-> Interfaces -> Edit the interface -> DHCP Server Tab-> General Setup tab -> Ignore interface
Network-> Interfaces -> Edit the interface -> DHCP Server Tab-> IPv6 Settings -> Select Disabled at the drop down list for Router Advertisements, DHCPv6 and NDP

Then I rebooted the router. So I figured I might brik my router with this move, but I am experimenting and trying to learn so why not. So now nothing works on the LAN port and the wireless is broken.

I have a serial terminal command line and I will reflash my banana pi R3 back to a state where it is not broken and try it again.

Can anyone help a rookie like me with how to do this the right way? Thanks so much.

Based on your description of the changes you made, theoretically only DHCP is broken, not the actual networking. If you use a static IP, you should be able to regain access.

I cannot speak to making AGH into a DHCP server, but I will ask this: why do you want to change from dnsmasq (the OpenWrt default) to AGH?

I am experimenting and want to create a family friendly router solution. AGH seems like a nice way to do that. I already have a purchased solution in place to protect my children. I am just a curios engineer learning Linux and networking and having fun. AGH has lots of features to do DNS filtering on a very granular level.

Can you tell me how I would set a static IP address from the command line? Thanks.

Set a static IP on what?

If you're talking about DHCP reservations, that can be done in the GUI as well as the CLI. Here's documentation for the CLI:

Thanks for the reply. I am assuming I would need to set a static IP on my openwrt LAN interface? This would give me GUI access again? And also SSH access again? I have access via serial port terminal. I have a connection to the internet on the WAN port (my google fiber interface). I just one connection on the LAN ethernet port (a Debian Linux computer). Or maybe I would need to set it on the openwrt box LAN and also my ethernet port on the Debian Linux box?

This is the default state. Did you change it?

Let's see what your config looks like (ignore the ssh part of this, you can do this over serial):

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall

I had already reinstalled openwrt on my eMMC by the time I saw your post. I did a complete erase of the eMMC so I would get a fresh start. So I apologize for not having settings that I can share. Thanks so much for being willing to help me. I will be a bit more careful this time and capture before and after of the config settings you posted.

So is it working now?

I have a fresh system up and running. I have not reinstalled Adguardhome yet. So it's working as of now.

Ok... with that in mind, I wouldn't recommend moving away from dnsmasq as the DHCP server unless you have a specific reason to do so.

I think you are right. I can figure out a better way to ID users than breaking all the goodness of openwrt by using adguardhome for DHCP.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.