[How-To-Updated 2021] Installing AdGuardHome on OpenWrt [Manual and opkg method]

I wrote their IP address here:
dns:
bind_hosts:

  • 127.0.0.1
  • ::1
  • 10.19.25.12
  • 172.20.25.15
  • 192.168.1.1
  • fd1a:c860:7174::1
    port: 53

I also open 53, 5353 for DNS and port 67 68 for DHCP firewall rules

What else I need to do?

Thanks

those are strange ip addresses. Usually you would use .1 for the main gateway for a new subnet range?

How have you setup your network ?

My bad I had in this way

bind_hosts:

  • 10.19.25.1
  • 172.20.25.1
  • 192.168.1.1
    port: 53

Those two are guest wifi - 10.19.25.1

  • 172.20.25.1 with their on firewall rules they don't have access to LAN 192.168.1.1.
    When I do your installation moving Dnsmasq to por 5353 a AGH port 53 is when breaks internet access to the Guest network, I can have access with plain DNS IP address but not typing for example CNN.com.

If I install AGH without changing Dnsmasq settings and port (using port 53) and AGH using port 5353 I don't have any issues, with firewall ports 67 68 53 opens, but I don't have rDNS working meaning AGH can no identify single devices connected to those guest interfaces only show what DNS was blocked on main banding host for those guests interfaces but for LAN interface show every single IP address devices.

So I think is a firewall rule that is breaking the guests interfaces when I do your setup. So what rules I need to have on the firewall to make work

Thanks

Ideally you should get your networking/firewalling working before swapping AGH into your dns setup. That way you can post a regular thread asking for help. Once its fully working you should just be able to insert AGH as dns server and it should pick up the networking that is setup and bind to those networks.

I had all the firewall working and I had access to internet before installing AGH. I had DHCP and DNS with TCP and UDP on port 67 68 53 and was working fine and after installing AGH thos guest wifi only can access internet with plain DNS address not with regular like CNN.com

Thanks

I fallow this guide [HowTo] Running Adguard Home on OpenWrt and AGH works but the private reverse DNS servers doesn't identify any of the hostnames of the clients with private IP address.

if AGH is bound to those ip addresses it should be responding to DNS requests.
Is the DHCP for each ip range giving out proper DNS options?

So for your LAN 192.168.1.1 range you should have this :
Your other rules should be similar for the other zones.

	list dns 'fd1a:c860:7174::1' #ipv6 dns
	list dhcp_option '6,192.168.1.1' #ipv4 dns
	list dhcp_option '3,192.168.1.1' #ipv4 gateway

you could just make your other ip ranges similar aka

192.168.2.1 #guest
192.168.3.1 #iot

Without knowing how your networking and firewall rules are setup its hard to see what you have broken.

Thanks for you time and aknowledge. Now is working and running good so far. I will run some test.

When I add for every interface this line got access.

list dns 'fd1a:c860:7174::1' #ipv6 dns
list dhcp_option '6,192.168.1.1' #ipv4 dns
list dhcp_option '3,192.168.1.1' #ipv4 gateway

Thanks again for you dedication and work for the openewrt community.

1 Like

Is it possible to detect the current running hardware architecture version? For example when first time we run this script it autodetect the hardware version installAGH.sh we don't specified for that, so is it possible to autodetect the same way when we run updateAGH.sh? Or if any possibility to merge installAGH.sh and updateAGH.sh in such way; so we have one additional switch -update for updates like we have "./AdGuardHome -s start|stop|restart|status|install|uninstall|update" ? Ty

uname -i but that doesnt always work.

root@OpenWrt:~# uname -i
unknown

uname -a

Linux OpenWrt 5.4.163 #0 SMP PREEMPT Mon Dec 13 17:21:25 2021 aarch64 GNU/Linux

The AGH team are looking into better updating practises and there's an issue filed for it.
I only wrote the manual update patch script for a specific case. That being my old BT Hub5 had VERY limited space and there was not enough room for a backup AND a new install. Thus i just made it grab the update and unpack it over the top of the existing install. It works but its not recommended. It is far better to have your /opt/AdGuardHome folder mounted on additional storage like a usb drive instead, if you are that limited on space.

My scripts do NOT do auto detection. It is the AGH install script that i pull and run that does everything like that.

1 Like

Thanks for reply.

I just run this uname -a and got this result
root@OpenWrt:/# uname -a
Linux OpenWrt 5.4.154 #0 SMP Sun Oct 24 09:01:35 2021 mips GNU/Linux

Yes, I already attached USB stick and got 7GB free space in overlay, So is it ok to download this new version https://static.adguard.com/adguardhome/edge/AdGuardHome_linux_mips64_softfloat.tar.gz to upgrade with current one? Ty.

If you have AGH home installed to your usb drive then you dont need to manually update. It will prompt you from the web interface when it is time to update and self update. My script was specifically for VERY low space routers only. You should not require it. But yes. the Mips version is the one you require.


I am getting this message and on click it redirection me to AGH home page. So how this autoupdate trigger?? Do i need to reboot or some other steps? Ty.

click the "follow these steps to manually update link" maybe?

Ok checking.


This manual steps its showing, So is it ok if i use this one rather then those manual steps, as both seems same. Additional the updateAGH.sh this one already have link wget https://static.adguard.com/adguardhome/edge/AdGuardHome_linux_mips_softfloat.tar.gz -P /tmp

And based of above uname -a should i change it to https://static.adguard.com/adguardhome/edge/AdGuardHome_linux_mips64_softfloat.tar.gz will it work or conflict? As i am not sure how to check current install version is 32 or 64 bit.

Just use AGH instructions. They have obviously changed some of their updating processes. Theirs will be the most up to date.

Ok thanks, and how to check the current running version? Is it 32 or 64 bit!

whats your router. that will tell you.

D-Link DIR2660 A1