-
Notifications
You must be signed in to change notification settings - Fork 1.9k
FAQ
- Why AdGuard Home doesn't block ads?
- How to configure AdGuard Home to write verbose-level logs
- After installing AdGuard Home, how to change dashboard interface's address?
- How to set up AdGuard Home as default DNS server?
- How to configure AdGuard Home to run together with pixelsrv-tls?
- Are there any known limitations?
- Why am I getting "bind: address already in use" error when trying to install on Ubuntu?
- How to configure a reverse proxy server for AdGuard Home?
- How to fix “permission denied” errors on Fedora?
- How to uninstall AdGuard Home?
Suppose you expect that AdGuard Home must block somebadsite.com
but for some reason it doesn't. Let's try to resolve this issue.
Most likely you didn't configure your device to use AdGuard Home as default DNS server. To check if you're using AdGuard Home as default DNS server:
-
On OS Windows open Terminal window (Start -> Run ->
cmd.exe
). On other systems open your Terminal application. -
Execute
nslookup example.org
. It will print something like this:Server: 192.168.0.1 Address: 192.168.0.1#53 Non-authoritative answer: Name: example.org Address: <IPv4> Name: example.org Address: <IPv6>
-
Check if
Server
IP is the same IP AdGuard Home is running on. If no, then you need to configure your device, see https://github.com/AdguardTeam/AdGuardHome/wiki/FAQ#defaultdns. -
Ensure your request to
example.org
appears in AdGuard Home UI on pageQuery logs
. If not, then you need to configure AdGuard Home to listen on the specified network interface. The most straightforward way to do so is to reinstall AdGuard Home with default settings.
Now that you are sure that your device uses AdGuard Home as default DNS server, the problem might be in AdGuard Home misconfiguration. Please check and ensure that:
-
You have
Block domains using filters and hosts files
setting enabled inSettings -> General settings
. -
You have the appropriate safe services enabled in
Settings -> General settings
. -
You have the appropriate filters enabled in
Filters -> DNS blocklists
. -
You have no filters enabled in
Filters -> DNS allowlists
that may interfere. -
You have no DNS rewrites in
Filters -> DNS rewrites
that may interfere. -
You have no custom rules in
Filters -> Custom filtering rules
that may interfere.
To troubleshoot a complicated issue, it is often needed to enable verbose-level logging in AdGuard Home. Here's how it should be done:
- Stop AdGuard Home
- Configure AdGuard Home to collect logs. In order to do that, edit
AdGuardHome.yaml
:- Set path to the log file in
log_file
- Set
verbose
toTrue
- Set path to the log file in
- Restart AdGuard Home and reproduce the issue
-
Open
AdGuardHome.yaml
in the text editor -
Modify
bind_host:
value to set a new network interface, e.g.:- 0.0.0.0: listen on all network interfaces
- 127.0.0.1: listen on localhost only
-
Modify
bind_port:
value to set a new port -
Restart AdGuard Home:
./AdGuardHome -s restart
This setup will automatically cover all the devices connected to your home router and you will not need to configure each of them manually.
- Open the preferences for your router. Usually, you can access it from your browser via a URL (like http://192.168.0.1/ or http://192.168.1.1/). You may be asked to enter the password. If you don't remember it, you can often reset the password by pressing a button on the router itself. Some routers require a specific application, which in that case should be already installed on your computer/phone.
- Find the DHCP/DNS settings. Look for the DNS letters next to a field which allows two or three sets of numbers, each broken into four groups of one to three digits.
- Enter your AdGuard Home server addresses there.
- You can't set a custom DNS server on some types of routers. In this case it may help if you set up AdGuard Home as a DHCP server. Otherwise, you should search for the manual on how to customize DNS servers for your particular router model.
- Open Control Panel through Start menu or Windows search.
- Go to Network and Internet category and then to Network and Sharing Center.
- On the left side of the screen find Change adapter settings and click on it.
- Select your active connection, right-click on it and choose Properties.
- Find Internet Protocol Version 4 (TCP/IP) in the list, select it and then click on Properties again.
- Choose Use the following DNS server addresses and enter your AdGuard Home server addresses.
- Click on Apple icon and go to System Preferences.
- Click on Network.
- Select the first connection in your list and click Advanced.
- Select the DNS tab and enter your AdGuard Home server addresses.
- From the Android Menu home screen, tap Settings.
- Tap Wi-Fi on the menu. The screen listing all of the available networks will be shown (it is impossible to set custom DNS for mobile connection).
- Long press the network you're connected to, and tap Modify Network.
- On some devices, you may need to check the box for Advanced to see further settings. To adjust your Android DNS settings, you will need to switch the IP settings from DHCP to Static.
- Change set DNS 1 and DNS 2 values to your AdGuard Home server addresses.
- From the home screen, tap Settings.
- Choose Wi-Fi in the left menu (it is impossible to configure DNS for mobile networks).
- Tap on the name of the currently active network.
- In the DNS field enter your AdGuard Home server addresses.
- Open dashboard
- Go to
Settings
->DNS settings
- Scroll to
DNS server configuration
section - For
Blocking mode
setting selectCustom IP
radio button and enter the IP address of pixelsrv-tls instance running. - Click
Save
Here are some examples of what cannot be blocked by a DNS-level blocker:
- YouTube, Twitch ads
- Facebook, Twitter, Instagram sponsored posts
Essentially, any advertising that shares a domain with content cannot be blocked by a DNS-level blocker.
Is there a chance to handle this in the future?
DNS will never be enough to do this. Our only option is to use a content blocking proxy like what we do in the standalone AdGuard applications. We're going to bring this feature support to AdGuard Home in the future. Unfortunately, even in this case, there still will be cases when this won't be enough or would require quite complicated configuration.
Because 127.0.0.1:53 which is used for DNS is already occupied by another program.
The easiest solution would be simply to choose a different network interface and bind it to your external IP (for instance, your Wi-Fi IP).
If for some reason you really want to bind to 127.0.0.1
, read the explanation below.
Ubuntu comes with a local DNS server by default - "systemd-resolved" which uses 53 port and thus prevents AdGuard Home from binding to it. To fix this, you should disable "systemd-resolved" daemon. Luckily, AdGuard Home can detect such configurations and disable "systemd-resolved" for you if you press "Fix" button which is shown near to "address already in use" message.
But if you're using AdGuard Home with docker or snap, you need to do it yourself.
Follow these steps:
-
Deactivate
DNSStubListener
and update DNS server address. Create a new file:/etc/systemd/resolved.conf.d/adguardhome.conf
(create a/etc/systemd/resolved.conf.d
directory if necessary):[Resolve] DNS=127.0.0.1 DNSStubListener=no
-
Specifying
127.0.0.1
as DNS server address is necessary because otherwise the nameserver will be127.0.0.53
which doesn't work withoutDNSStubListener
. -
Activate another resolv.conf file:
sudo mv /etc/resolv.conf /etc/resolv.conf.backup ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
-
Restart
DNSStubListener
:systemctl reload-or-restart systemd-resolved
If you're running a web server already and you want to access AdGuard Home dashboard UI from an URL like http://YOUR_SERVER/aghome/
you can use this configuration for your web server:
location /aghome/ {
proxy_pass http://AGH_IP:AGH_PORT/;
proxy_redirect / /aghome/;
proxy_cookie_path / /aghome/;
}
:80/aghome/* {
route {
uri strip_prefix /aghome
reverse_proxy AGH_IP:AGH_PORT
}
}
When you use TLS on your reverse proxy server, there's no need to use TLS on AdGuard Home.
Set allow_unencrypted_doh: false
in AdGuardHome.yaml to allow AdGuard Home respond to DoH requests without TLS encryption.
- Moved the
AdGuardHome
binary to/usr/local/bin
. - As
root
, execute the following command to change the security context of the file:# chcon -t bin_t /usr/local/bin/AdGuardHome
- Add the required firewall rules in order to make it reachable through the
network. For example:
# firewall-cmd --new-zone=adguard --permanent # firewall-cmd --zone=adguard --add-source=192.168.0.14/24 --permanent # firewall-cmd --zone=adguard --add-port=3000/tcp --permanent # firewall-cmd --zone=adguard --add-port=53/udp --permanent # firewall-cmd --zone=adguard --add-port=80/tcp --permanent # firewall-cmd --reload
See issue 765.
The way to uninstall AdGuard Home depends on how you installed it.
IMPORTANT: After uninstalling AdGuard Home, don't forget to change your devices configuration and point them to a different DNS server.
In this case you need to do the following:
- Unregister AdGuard Home service:
./AdGuardHome -s uninstall
- Remove AdGuard Home directory
Uninstalling is trivial, stop and remove the image.
Just one command: snap remove adguard-home