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

how to use adguard ipset like dnsmasq in dnsmasq i was using * symbol which refer to anything how i can i use * in adguard ipset for example in dnsmasq ipset=/*.googlevideo.com/media how to use the same *.googlevideo.com in adguard

This is discussed in the openwrt wiki page about AdGuard Home , and also in the AdGuard Home wiki (search for "ipset" in that section).

1 Like

all went well until that last command that gives:

/etc/init.d/dnsmasq restart
udhcpc: started, v1.35.0
udhcpc: broadcasting discover
udhcpc: no lease, failing

that is fine.

TLDR? - it does a ping to make sure its the only DHCP server on the network. It is just a notification not a warning/error.

Router Linksys WRT1900ACS v2
Firmware Version Divested-WRT SNAPSHOT r20650+11-8b06e06832 / LuCI Master git-22.245.77360-10bcb22

@mercygroundabyss It is possible to install AdGuard Home on a memory stick, what would be the command for my example?

1 Like

But instead of mounting it as /mnt/sdxx you could just mount it as /opt and then use my guide without modification. Its easier that way.

1 Like

it is correct now, or only need /opt without /mnt/sda1?

mount it as /opt only

1 Like

done

I did not install AdGuard it on openwrt, as information, what is the installation script for AdGuard in /opt ?

#!/bin/sh
#Stop AGH
/etc/init.d/AdGuardHome stop 

#Grab updated AGH from server and save to /tmp
wget https://static.adguard.com/adguardhome/edge/AdGuardHome_linux_mips_softfloat.tar.gz -P /tmp

#unzip updated file over top of AGH in /opt
tar x -vzf /tmp/AdGuardHome_linux_mips_softfloat.tar.gz -C /opt

#cleanup /tmp
rm /tmp/AdGuardHome_linux_mips_softfloat.tar.gz

#Restart AGH
/etc/init.d/AdGuardHome start
echo 'Updated'

that is the wrong script. follow the instructions in first post. you do NOT need that updater script. its HIGHLY specific and requires editing if u use it. AGH should auto update on a click in the web interface.

My AGH works great on my router (im using DoH), but i wanted to set up private DNS on my phone, so it uses cloud flare dns when im outside of my home network, but when i set it up (it uses DoT), and im connected to my home network, my phone seems to bypass AGH, and doesnt filter out ads, is there a way to force my phone to still use my AGH while on my home network, without disabling the private DNS option?

That exception would need to be configured on your phone, wherever you configured DoT. The purpose of all the encrypted/signed DNS variants is to prevent manipulation of DNS which is what DNS-based ad-blockers rely on.

I dont think thats possible, cause enabling private DNS seems to bypass everything completly, no matter which dns i use, i guess i could just maybe set up DoT on my AGH and then use it on my phone as the private DNS, that should work right?

1 Like

Yes, while you're home but then you'd need a way to (automatically) turn it back on on the device when you're on the road.

1 Like

There's a few ways to do this.

First is one listed near top of thread where they use external provider to do their blocking and dns. This combines with AGH at home as well.

Second is to use vpn back to your network and just use your AGH as dns.

Third is enable DoT interception that forces your phone to talk to AGH when on your home network. Currently its bypassing your AGH as it is going direct to Cloudflare’s. The wiki mentions plain dns interception but doesn't touch on encrypted dns blocking/interception. That will take some googling.

Or just use an app like blokada that does vpn/blocking on your phone instead

1 Like

Thank you, that is very helpful, i will probably use wireguard or blokada, cause i dont know im capable of googling all that stuff myself to make it work.

Hi community!:

First of all, thank you so much for this fantastic guide @mercygroundabyss, my setup is different than a "basic setup" (I got different VLANs for different purposses), but I've been able to make work AdGuardHome without problems, well, as a DNS resolver, but with DNS queries as plain text.

How can I make that AdGuardHome works like DoT and / or DoH DNS resolver?, at the dashboard, all the DNS queries are "DNS simple" (plain text), I'm using port 53 for AGH and 53535 for dnsmasq, the traffic is redirect from 192.168.x.0/24 port 53 to the 192.168.99.1 port53 (DNS VLAN working as DNS resolver).

Thanks you so much in advance for your help and time guys, regards.

It does not make much sense to configure DNS encryption inside of your own local network. The purpose of securing your DNS traffic is to secure it from third-parties that might be analyzing or modifying it. For instance, from your ISP.

It means that you will need a server with a public dedicated IP address. There are plenty of cheap cloud servers providers: DigitalOcean, Vultr, Linode, etc. Just choose one, create a cloud server there, and install AdGuard Home on your server.

In short you need a publicly addressable server with a SSL Cert. it is possible to do internally on a home router but somewhat tricky and requires some googling.

1 Like

What are the storage space requirements when installing AdGuardHome via LuCi from the Software page (opkg)?

I installed AdGuard on my Linksys E8450 / Belkin RT3200. Do I need to worry about running out of storage space (when I upgrade in the future)? The wiki mentions the agh-backup folder and a 100MB free disk/flash space requirement. Does this apply when installing via opkg? Also seems like the filter lists are stored in RAM.

Similar question was asked on Reddit. Perhaps we can update the wiki regarding storage space requirements.