Setting Up AdGuard: DNS Redirect doesn’t work

I’m not 100% sure if I understand your question. You mean you don’t have internet connection on your clients? Which is logic if you switch of the RPi hosting AGH. Settings in /etc/resolv.conf is applicable for the RPi themselves but has nothing to do how your clients resolve DNS request. Your clients will you the DNS server they got assigned via DHCP. Not sure what DHCP server you are running but some allow to assign a 2nd DNS that can be used if first one is failing.

Let me rephrase my question: If the AGH Rpi is shut down or it fails, is there a way to allow my devices to automatically connect to the internet? i.e. bypass the Rpi?

Let me quote myself

Not sure what DHCP server you are running but some allow to assign a 2nd DNS that can be used if first one is failing.

I’m running the Rpi AGH Quad9 servers as mentioned.

AGH is DHCP server as well?

Yes, correct.

Did you checked if there is an option inside AGH to assign a 2nd DNS server? If not you might need to ask AGH guys at their GitHub if such option exist.

I could not find a second one so I"ve asked https://www.reddit.com/r/Adguard/comments/pzwyww/2nd_dhcp_server_option/ on their Reddit forum.

Wrong question ask. You are looking for a secondary DNS server option inside AGH DHCP function. And it might be better to ask directly on AGH GitHub instead of Reddit

Thx, I’ve tried again https://github.com/AdguardTeam/AdGuardHome/discussions/3698.

Let’s see if there will be an answer. If not you might consider to use PiHole as it is way more flexible.

Oh boy, back into the fire :roll_eyes: lol.

Whatever that means :sunglasses:

Setting up AdGuard was more work than expected (for a beginner), but my previous experience with pihole was even more work. Which is why I migrated from pihole to adguard in the first place. :cry:

usually AGH as well as PiHole are working out of the box. There shouldn’t be that much need for difficult configuration.

Installation for both is a breeze. But configuring them has been time consuming for me. That said, my SmartRG modem router GUI is pure ka-ka, poo-poo, so that hasn’t helped.

AdBlocking and DNS resolution is working out of the box. The only thing needed would be to activate the DHCP server if needed. What further configuration steps you have done?

AGH DHCP is already setup. I received a response to my question on Adguard github. One can add a DNS server option! Back to my original question: What DNS would I use so that I have internet access if the Rpi fails?

Also, this morning I also enabled ufw. Previously I had allowed port 53 without the subnet but it still blocked all access to the internet. After reading a few ufw tutorials and fiddling, I added the subnet /24 and now I have access on all devices. It was the only way I could get it to work.
53 ALLOW IN 192.168.1.0 /24

Simply use Cloudflare or Quad9 public DNS as fall back.

Well, I edited the AdGuardHome.yaml config file, but when I shut down the Rpi I lose internet access:

dhcpv4:
gateway_ip: 192.168.1.1
subnet_mask: 255.255.255.0
range_start: 192.168.1.110
range_end: 192.168.1.254
lease_duration: 86400
icmp_timeout_msec: 1000
options:

  • 6 ips 9.9.9.9
  • 149.112.112.112