not add lines as ask you to do synapse, it's a false info, he is not intended to answer, to fix your issue do only two steps: Step 1. In your adguardhome.yaml file make sure you have those strings
dns:
bind_hosts:
- 127.0.0.1
- 192.168.1.1
Where:
127.0.0.1 [io loop]
192.168.1.1 [your router ip, the one is not pinging]
Step 2. In your local startup put this sting [OpenWrt Web Interface -> System tab -> Startup tab -> Local Startup tab] service adguardhome restart
after you do that, restart your router manually
it will 100% fix your issue, do not forget to say thanks to me.
i am a developer of AGH (Russia based HQ), and this is already a known issue of OpenWrt, not AGH itself
Thanks Sentenzo, this fixed the issue.
I knew it had to do with DNS but couldn't find where/how to fix this.
On a separate note, continued with the guide installing wireguard VPN (https://tristam.ie/2023/805/) and although it has been configured, now when I run the adguard test page it says adguard is not running.
Is that because now I'm skipping the local ad blocker and tunneling to my vpn server?
also may I ask, is a raspberry pi 3B+ still a good device for this project? I believe wireless is limited to "N" which may make it slow?
i guess AGH was suspended by OpenWrt due to it broke opkg update command like mentioned me and user above your comment
it is still in a snapshot /packages/ so it has compiled but i also can't find it via software
if you have enough power you can install it manually, just put agh file into your router and use command like opkg install packagename.ipk
I can confirm that on 23.05, we don't need to specify -c edge to have Adguard installed in /opt. It's better if you prefer to stay with stable release. Maybe it could be great to indicate it in the first post.
Hi I have some questions installing Adguard Home for Openwrt.
I have a powerful x86 router (ssd, ram, cpu are plenty). Is it better to install from Adguard's website using their automated curl install script? Or is it still recommended to use the official Openwrt adguard opkg package?
When I follow the wiki and this post to install Adguard Home, Openwrt can no longer run opkg update, it cannot resolve DNS. After looking at the comments here this seems to be resolved by adding 127.0.0.1 adguardhome.yaml file to bind_hosts. Good but is missing from guide?
I had same issue as here:
but mercygroundabyss writes:
Everything the router does goes via Adguard. I can see all opkg updates, traceroutes and pings the router is doing in Adguard's logs. If I understand right, @mercygroundabyss says it should not be like this. Router should use dnsmasq port 54 for own routes, not go to Adguard that is set to port 53?
I have set WAN DNS manually and I have also tried with the default peer setting on because my ISP is fine. But it does not matter what WAN DNS I have set, because all traffic from router goes via Adguard and router do not use the set WAN DNS. It has no effect what server is there.
Discussion seems to end because user was happy that Adguard works, but I don't see proper solution. If there indeed is loop back to Adguard when there should not be and router should do DNS lookups by itself.
Same as with andretoniolo, doing diagnostic nslookup from Openwrt:
Server: 127.0.0.1
Address: 127.0.0.1:53
According to mercygroundabyss this should go to dnsmasq port 54 so it routes it by itself and not directed to Adguard port 53?
Is there any solution? I could not find any going up and down this thread.
Hi let me repeat that in sense Adguard and Openwrt "works" but not the intended way according to mercygroundabyss. That the router should be capable of resolving without Adguard.
I don't know if problem is more in Openwrt settings or yaml file but feels like router, if router should be able to resolve by itself without Adguard.
If you want router to resolve all your DNS queries then let openwrt to have default DNS server port i.e., 53 and DNS forwarding to 192.168.1.1#54
Where 54 DNS port is for your adguard. But from my experience you just let adguatd has DNS port 53.
Same issue for me resulting in random failures to start on [re]boot for AdGuard Home (opkg verson). Quite annoying since there is no DNS failover when AGH is not up and running.
My workaround was to add service adguardhome restart line to the Local Startup, forcing AGH to restart at the end of the boot process. Tweaking Start and Stop values in /etc/init.d/adguardhome is a possibility, too, but the forced restart seems more bulletproof to me.
Seems to be working so far. Hope this helps if anyone faces the same issue.
As I added some complexity to the network (more interfaces with VLANs), restarting AGH from rc.local was no longer bulletproof. AGH failed again with logs showing yet another error:
couldn't start forwarding DNS server: starting listeners: listening on udp addr 127.0.0.1:53: listening to udp socket: listen udp 127.0.0.1:53: bind: cannot assign requested address
Adding sleep xx might have been another workaround.
The default value of 5 retries allows AdGuardHome to fail 5 times and be restarted automatically after waiting for 5 seconds. No need to set delays, or change priority of the original init file. Hopefully, will be more bulletproof this time
I would like to upgrade from 22.03 to 23.05. How can I make sure, that AdguardHome is running after the upgrade? It's my only DNS resolver in the network.
Is it better to use the AdguardHome pkg from the repo or the binary from Github? The Github releases are far more up to date.
As after the last OpenWRT update I was missing AGH and my GL-B1300 has only 32Mb flash, so I had to add a USB stick as extroot.
A few things I'd like to suggest:
In the case AGH service goes down (I had to restore from backup and I didn't save its huge binary into a backup, only yaml config, see below) your opkg won't work as it uses dnsmasq and you won't be able to reinstall all the packages as they are not saved either, so important things to start this manual with, as well as a rerun/terdown of this guide to restore DNS (simple change of nameserver to 1.1.1.1 in /etc/resolv.conf will not help opkg, it needs SSL):
Installing edge and beta (didn't try stable) had my router oom'ing every 15 minutes, so first I preserved opkg lists and added a swap file, I had to edit /etc/init.d/AdGuardHome
It makes sense to have these hard-earned non-default configs backed up, so at the end of the guide I'd add: "For extroot setups your AGH configs will not be backed up automatically, so go to https://192.168.1.1/cgi-bin/luci/admin/system/flash -> Configuration and add
I recently upgraded to 23.05 and installed AGH pkg from repo (due to space considerations mostly). But then overwrote the /usr/bin/AdGuardHome with the newer version from Github. No side effects for now
I did not use the option to preserve settings when upgrading, but had all my configs saved as uci scripts, so had to re-run them after upgrading. For AGH though I kept the yaml file. Just my approach... Probably, not the fastest one.
I took most of the UCI commands from LuCI You make a change through LuCI interface, and get those unsaved commands, which can be saved and re-used in the future.
I found UCI system guide to be very useful for the general understanding of the uci configs, e.g. how to index sections, how to name sections (replacing those LuCI generated autogenerated IDS, like cfg073777).