[Question] Block Ads on system hosting Adguard Home
I've thought about deploying Adguard Home on my Linux PC that I also use for daily business, so that the complete network traffic of it is filtered through Adguard Home, but up to now without success.
I've set it up twice, once via the snap package, once via the Docker container. Both times I could access the admin interface successfully, but I could also see that no ads were filtered. I suppose it might have been because the traffic didn't actually reach Adguard Home. My approach was to use 127.0.0.1 as the DNS for my LAN and WiFi connection, but no success. The problem might be that I couldn't use 127.0.0.1:63 (needed to change the port from 53 to 63 because of Ubuntu systemd-resolved on port 53) as a valid DNS entry in the connection configuration tool here on Ubuntu Budgie. Is there another way to do that?
Is my approach even possible and useful or can you spot the error I was making. Or is using Adguard Home to block ads on the same system where it is hosted i. e. in a Docker container not even possible? Or is it even needed? I've searched the guides on insights on this idea but couldn't find anything. Maybe you have some for me.
Thanks for some helpful advice.
but I could also see that no ads were filtered
Have you checked the query log in AdGuard Home, do you see all the requests there?
The problem might be that I couldn't use 127.0.0.1:63 (needed to change the port from 53 to 63 because of Ubuntu systemd-resolved on port 53) as a valid DNS entry in the connection configuration tool here on Ubuntu Budgie. Is there another way to do that?
This may be the reason.
Try this instruction: https://github.com/AdguardTeam/AdGuardHome/wiki/FAQ#bindinuse
And one more thing -- you may need to change the Blocking mode in AdGuard Home DNS Settings, try Null IP for instance.
Thanks for the quick reply. I'll try your suggestions.
Still no luck. I've followed the instructions you've linked, but I still get listen udp 0.0.0.0:53: bind: address already in use Is there anything else to do for that to work?
The problem in this case seems to be, that libvirt-dnsmasq is blocking the port:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
dnsmasq 1632 libvirt-dnsmasq 5u IPv4 40805 0t0 UDP jl:domain
dnsmasq 1632 libvirt-dnsmasq 6u IPv4 40806 0t0 TCP jl:domain (LISTEN)
@ameshkov Do you have any tipps on how to solve that problem?
You can't have 2 DNS servers working on the same machine on the same default port (53). You should either disable libvirt dnsmasq service, or set another port for AGH.
@szolin You're right, but setting another port for AdGuard Home didn't work because I couldn't set i. e. 127.0.0.1:63 as the DNS server for my cable connection and WiFi, only 127.0.0.1
In this case I think your only option is to remove or disable libvirt dnsmasq service.
Ok, then so be it, thanks for your help.