Home Assistant Community Add-on: AdGuard Home

is this add-on supposed to remove ads? it does not seem to work on my android phone.

Is your phone using it as it’s DNS?

dns is on my router. (it worked when I used PI-hole)

Unless you told your router (which would tell your phone) to use adguard as the dns you wont get any filtering.

You should be able to look at the query log and see traffic from your phone. If you see traffic from your phone but are still getting ads, then look into additional block lists.

Check on your phone if you have private DNS on automatic. That could route DNS queries towards the google DNS server.
Another problem could be IPv6. I never figured out a way to block ads with adguard on IPv6, so I had to disable it completely on my network/router.

1 Like

I’m using this add-on and running it as a DHCP server. Is there a possibility to use this for presence detection in Home Assistant?
I found something for Pihole, would this be possible with Adguard? Use Pi-hole DHCP to speed up ping device tracker detection

Question: Does the AdGuard Home integration only work with the the official HA AdGuard Home add-on? I was trying to connect it to a known working AdGuard instance and it keeps failing to connect. My HA instance and the AdGuard Home instance are on different physical machines in the same subnet.

I’m running it on a different machine/CT, and it is working with HA.
The HA addon has autocomplete for the port, it wants you to use 3000. Try replacing it with 80, it should work.

1 Like

I did notice that and I used 80 but it still didn’t work. I just tried again and realized I am so dumb. I was putting http:// in front of the IP. DOH!

Tried it with just the IP and port 80 and it worked just fine. Thanks for the reply.

1 Like

Love this! Thanks @frenck for adding :smiley:

I managed to add this on my iPhone, from bed, in less than 15min (rpi4, 8gb)

Question: (sorry if the wrong place to ask)

Anyone got some nice templates/cards they have developed?
Maybe a nice daily trending?
Or something that shows how much blocked for each client on the network (eg my iPhone vs my partners iPhone)

This is very likely a stupid question. Successfully installed AGH on my HA Pi and everything is working well. However, when I look at the AGH web UI, the version at the bottom of the Dashboard says v0.102.0. Clicking the “update” button returns “AdGuard Home is up to date”. I have a redundant AGH installed on another Pi and the latest version there is v0.103.3. Is this just a matter of waiting for the add on to get updated or did I do something wrong installing it? FYI, I’ve already been able to successfully update the HA instance so the system appears to be checking for updates appropriately. Thanks!

I achieved this through adguard.add_url and adguard.remove_url

Ran into a problem.

I have set a static ip with nmcli. and I set the static dns to 8.8.8.8 and 8.8.4.4.
On my DDWRT I have the IP of my HA set as static DNS.
But when I check what DNS is being used it is Frontier’s (my internet provider’s) and not Google’s. I followed the how-to but must have missed something.

My Hassio is the NUC image if that makes a difference. Thanks for any help.

This is so the machine/supervisor has a DNS to use before the adguard add-on comes alive.

  • What DNS does the AdGuard add-in point to.
  • I presume your client machine/PC is pointing to the Router for DNS?
  • Have to rebooted the router (flush any cache)?

How do you check which DNS is being used?

You should see the queries appear in the AdGuard log.

Hello,
is it possible to integrate a switch to enable or disable services like epicgames, youtube etc?

1 Like

That is what I get from whatsmydns

I know the woodynet is quad9, but I don’t want frontier DNS.

Do you see anything in the AdGuard logs?

Open a terminal on the client PC (not HA PC) and do dig yahoo.com (or any domain. What is the reported server used e.g.

;; Query time: 25 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Sep 07 18:06:27 BST 2020
;; MSG SIZE  rcvd: 56
;; Query time: 15 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Tue Sep 08 01:24:11 EDT 2020
;; MSG SIZE  rcvd: 239

Which is the router?

Do you see anything in the AdGuard log?

Is there a fall back DNS setting?

Hi All,

Having trouble with adguard after migration to a new server. a 502 gateway on ingress so the addon isn’t really started but i can access it throught the ip adress given in the logs http://127.0.0.1:45158 but I also see no new request comming through.
info:

  • OS: Linux Mint
  • HA: 0.114.4

did these steps on the server:

  • /etc/NetworkManager/system-connections$ sudo nano Wired\ connection\ 1.nmconnection
  GNU nano 4.8                                         Wired connection 1.nmconnection                                                    
[connection]
id=Wired connection 1
uuid=7599916d-0b7b-3a36-94d9-392946d8e11c
type=ethernet
autoconnect-priority=-999
interface-name=enp0s31f6
permissions=
timestamp=1599568785

[ethernet]
mac-address-blacklist=

[ipv4]
address=10.10.1.71/24;10.10.1.1
dns=8.8.8.8;8.8.4.4;
method=manual

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
ip6-privacy=0
method=ignore

[proxy]
  • sudo systemctl disable systemd-resolved -> note systemd, i see many other using system but that service doesn’t excist.
systemd-resolved.service - Network Name Resolution
     Loaded: loaded (/lib/systemd/system/systemd-resolved.service; disabled; vendor preset: enabled)
     Active: inactive (dead)
  • Router DNS forward to 10.10.1.71, worked before on the other server

sudo nano /etc/resolv.conf

# Generated by NetworkManager
nameserver 8.8.8.8
nameserver 8.8.4.4

During my search on google i found someone changing /etc/systemd/resolved.conf and i also did that

[Resolve]
DNS=8.8.8.8
FallbackDNS=8.8.4.4
#Domains=
#LLMNR=no
#MulticastDNS=no
#DNSSEC=no
#DNSOverTLS=no
#Cache=yes
DNSStubListener=no
#ReadEtcHosts=yes

I think i get no errors in the log of adguard:

[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Add-on: AdGuard Home
 Network-wide ads & trackers blocking DNS server
-----------------------------------------------------------
 Add-on version: 2.5.0
 You are running the latest version of this add-on.
 System: Linux Mint 20  (amd64 / intel-nuc)
 Home Assistant Core: 0.114.4
 Home Assistant Supervisor: 242
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
Log level is set to DEBUG
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] adguard.sh: executing... 
[cont-init.d] adguard.sh: exited 0.
[cont-init.d] discovery.sh: executing... 
[15:42:34] DEBUG: Requested API resource: http://supervisor/discovery
[15:42:34] DEBUG: Request method: POST
[15:42:34] DEBUG: Request data: {"service":"adguard","config":{"host":"127.0.0.1","port":45158}}
[15:42:34] DEBUG: API HTTP Response code: 200
[15:42:34] DEBUG: API Response: {"result": "ok", "data": {"uuid": "698981a463524453b97a2ed7b47e079f"}}
[15:42:34] DEBUG: Filtering response using: .uuid
[15:42:34] INFO: Successfully send discovery information to Home Assistant.
[cont-init.d] discovery.sh: exited 0.
[cont-init.d] nginx.sh: executing... 
[15:42:34] DEBUG: Requested API resource: http://supervisor/addons/self/info
[15:42:34] DEBUG: Request method: GET
[15:42:34] DEBUG: Request data: {}
[15:42:34] DEBUG: API HTTP Response code: 200
[15:42:34] DEBUG: API Response: {"result": "ok", "data": {"name": "AdGuard Home", "slug": "a0d7b954_adguard", "hostname": "a0d7b954-adguard", "dns": ["a0d7b954-adguard.local.hass.io"], "description": "Network-wide ads & trackers blocking DNS server", "long_description": "# Home Assistant Community Add-on: AdGuard Home
[![Release][release-shield]][release] ![Project Stage][project-stage-shield] ![Project Maintenance][maintenance-shield]
[![Discord][discord-shield]][discord] [![Community Forum][forum-shield]][forum]
[![Sponsor Frenck via GitHub Sponsors][github-sponsors-shield]][github-sponsors]
[![Support Frenck on Patreon][patreon-shield]][patreon]
Network-wide ads & trackers blocking DNS server.
## About
AdGuard Home is a network-wide ad-and-tracker blocking DNS server with
parental control (adult content blocking) capabilities. Its purpose is to let
you control your entire network and all your devices, and it does not require
using a client-side program.
AdGuard Home provides a beautiful, easy and feature-rich web interface to
easily manage the filtering process and its settings.
![AdGuard Home in the Home Assistant frontend][screenshot]
[discord-shield]: https://img.shields.io/discord/478094546522079232.svg
[discord]: https://discord.me/hassioaddons
[forum-shield]: https://img.shields.io/badge/community-forum-brightgreen.svg
[forum]: https://community.home-assistant.io/t/home-assistant-community-add-on-adguard-home/90684?u=frenck
[github-sponsors-shield]: https://frenck.dev/wp-content/uploads/2019/12/github_sponsor.png
[github-sponsors]: https://github.com/sponsors/frenck
[maintenance-shield]: https://img.shields.io/maintenance/yes/2020.svg
[patreon-shield]: https://frenck.dev/wp-content/uploads/2019/12/patreon.png
[patreon]: https://www.patreon.com/frenck
[project-stage-shield]: https://img.shields.io/badge/project%20stage-production%20ready-brightgreen.svg
[release-shield]: https://img.shields.io/badge/version-v2.5.0-blue.svg
[release]: https://github.com/hassio-addons/addon-adguard-home/tree/v2.5.0
[screenshot]: https://github.com/hassio-addons/addon-adguard-home/raw/v2.5.0/images/screenshot.png", "advanced": false, "stage": "stable", "auto_update": true, "repository": "a0d7b954", "version": "2.5.0", "version_latest": "2.5.0", "protected": true, "rating": 6, "boot": "auto", "options": {"ssl": false, "certfile": "fullchain.pem", "keyfile": "privkey.pem", "log_level": "debug"}, "schema": [{"name": "log_level", "optional": true, "type": "select", "options": ["trace", "debug", "info", "notice", "warning", "error", "fatal"]}, {"name": "ssl", "required": true, "type": "boolean"}, {"name": "certfile", "required": true, "type": "string"}, {"name": "keyfile", "required": true, "type": "string"}, {"name": "leave_front_door_open", "optional": true, "type": "boolean"}], "arch": ["aarch64", "amd64", "armhf", "armv7", "i386"], "machine": [], "homeassistant": "0.113.2", "url": "https://github.com/hassio-addons/addon-adguard-home", "state": "started", "detached": false, "available": true, "build": false, "network": {"53/udp": 53, "80/tcp": null}, "network_description": {"53/udp": "DNS server port", "80/tcp": "Web interface (Not required for Ingress)"}, "host_network": true, "host_pid": false, "host_ipc": false, "host_dbus": false, "privileged": [], "full_access": false, "apparmor": "default", "devices": [], "icon": true, "logo": true, "changelog": true, "documentation": true, "stdin": false, "webui": "http://[HOST]:None", "hassio_api": true, "hassio_role": "default", "auth_api": true, "homeassistant_api": false, "gpio": false, "usb": false, "kernel_modules": false, "devicetree": false, "udev": false, "docker_api": false, "video": false, "audio": false, "audio_input": null, "audio_output": null, "startup": "services", "services": [], "discovery": ["adguard"], "ip_address": "172.30.32.1", "ingress": true, "ingress_entry": "/api/hassio_ingress/X0EzFt0apMTiAgod4Z3u_WWNAgkFEQ6ieUFr6paJGi0", "ingress_url": "/api/hassio_ingress/X0EzFt0apMTiAgod4Z3u_WWNAgkFEQ6ieUFr6paJGi0/", "ingress_port": 62857, "ingress_panel": true, "watchdog": true}}
[15:42:35] DEBUG: Requested API resource: http://supervisor/dns/info
[15:42:35] DEBUG: Request method: GET
[15:42:35] DEBUG: Request data: {}
[15:42:35] DEBUG: API HTTP Response code: 200
[15:42:35] DEBUG: API Response: {"result": "ok", "data": {"version": "9", "version_latest": "9", "host": "172.30.32.3", "servers": [], "locals": ["dns://8.8.8.8", "dns://8.8.4.4"]}}
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[15:42:35] INFO: Starting AdGuard Home server...
2020/09/08 15:42:35 [info] AdGuard Home, version 0.103.3, channel release, arch linux amd64
2020/09/08 15:42:35 [info] Initializing auth module: /data/adguard/data/sessions.db
2020/09/08 15:42:35 [info] Auth: initialized.  users:0  sessions:0
2020/09/08 15:42:35 [info] Initialize web module
2020/09/08 15:42:35 [info] Go to http://127.0.0.1:45158
2020/09/08 15:42:35 [info] Starting the DNS proxy server
2020/09/08 15:42:35 [info] Ratelimit is enabled and set to 20 rps
2020/09/08 15:42:35 [info] The server is configured to refuse ANY requests
2020/09/08 15:42:35 [info] DNS cache is enabled
2020/09/08 15:42:35 [info] Creating the UDP server socket
2020/09/08 15:42:35 [info] Listening to udp://[::]:53
2020/09/08 15:42:35 [info] Creating the TCP server socket
2020/09/08 15:42:35 [info] Listening to tcp://[::]:53
2020/09/08 15:42:35 [info] Entering the UDP listener loop on [::]:53
2020/09/08 15:42:35 [info] Entering the tcp listener loop on [::]:53
[15:42:35] INFO: Starting NGinx...
nginx: [alert] detected a LuaJIT version which is not OpenResty's; many optimizations will be disabled and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty's LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html)

sudo lsof -i -P -n | grep LISTEN

nginx     10065  root    5u  IPv4  62719      0t0  TCP 172.30.32.1:62857 (LISTEN)
AdGuardHo 10070  root   12u  IPv4  63776      0t0  TCP 127.0.0.1:45158 (LISTEN)
AdGuardHo 10070  root   22u  IPv6  62716      0t0  TCP *:53 (LISTEN)

Here i notice port 53 is linked to IPv6 but IPv6 is disabled so don’t know if it’s an error or it is correct.
update:

In Linux, IPv6 sockets may be both IPv4 and IPv6 at the same time. An IPv6 socket may also accept packets from an [IPv4-mapped IPv6 address](https://en.wikipedia.org/wiki/IPv6#IPv4-mapped_IPv6_addresses).

Has anyone else got a clue were i need to look for cause i can’t find anything anymore in google. If you need more info just let me know.

Kind regards