If you’re looking for a network-wide solution for ad-blocking and reducing the amount of
tracking online, AdGuard Home is a free and open-source solution that you can use.
The software is open source and can be self-hosted on an inexpensive device to both buy and run
such as the Raspberry Pi.
Aside from ad and tracker blocking, AdGuard Home also has other perks such as being able
to block malicious websites and give parents control over devices connected to the network
and what content is accessible.
You may be thinking “well can’t I just run an ad blocker in my browser” and the
answer is yes, but being able to do this at the DNS level across your whole network means
that all your devices won’t see ads, even if they can’t run an ad blocker and you
can free up system resources as you don’t need to run ad blocking software or apps on
all of your devices individually.
AdGuard Home isn’t the only type of software that does this, Pi-Hole is another option
that I covered a few years ago but I also wanted to share AdGuard Home as I thought
it is a handy piece of software that people may be able to benefit from.
The process of getting up and running with AdGuard Home is pretty straightforward as
an automated install script will do much of the heavy lifting that would otherwise need
to be done with a manual installation.
This process should work on most Linux and Mac systems, I shall be using a Raspbian Lite
installation on a Raspberry Pi 3 for this guide so I will be referring to the Raspberry
Pi a few times during this guide.
I’ll also be using SSH as this allows me to copy and paste any commands required for
the tutorial as well as do any configuration directly from my computer over the network.
To get started open the terminal and enter the following command.
This command shouldn’t take long to run and will let you know when AdGuard Home has
finished installing and is up and running.
Within the terminal you’ll see some IP addresses to browse to in a web browser, this will allow
us to finish the configuration.
As I’m doing configuration from my computer, I’ll be using the third IP address, but
if you’re doing this all directly on your Raspberry Pi you can browse to http://127.0.0.1:3000.
I really like the user interface of AdGuard Home and we can see that immediately as we
browse to the initial setup screen.
Pi-Hole which I mentioned earlier does let you be a little more hands-on with the configuration
and network side of things, but I think the interface of AdGuard Home is more user friendly
and pretty.
Going through the setup, the settings on the initial page can be left as-is, this will
allow you to be able to utilise AdGuard Home regardless of whether you use Ethernet or
Wi-Fi, but you can limit it to a specific network connection if you wish.
It’s also worth noting the instruction at the bottom of this page to set a static IP
address for the device hosting AdGuard Home, in this case, my Raspberry Pi.
This can be done in the settings of your network router, but I shall not be going into this
specifically as the method for doing this can drastically vary depending on who makes
your router.
You can also set your IP to static on the Pi itself, The Pi Hut has a useful guide on
how to do this but I would recommend setting the static IP directly from the router if
possible as this will mitigate any network conflicts in the future as your router typically
handles the assigning of IP addresses on your network.
On the next page, we can set a username and password to access the AdGuard Home admin
interface.
These are separate credentials to the user on the Raspberry Pi itself and are just used
to access the AdGuard Home admin panel.
Of course, to actually make use of AdGuard Home we’ll need to configure devices to
use the Raspberry Pi as its DNS server.
This page has instructions for various types of devices, and I also have a tutorial on
how to change your DNS server settings which you can look at for more information.
The best way to do this will be to change the settings on your router as this will mean
that all devices connected to your network will use AdGuard Home running on the Raspberry
Pi as the DNS server, but you can configure DNS settings on individual devices if you
wish to have more control.
When changing your DNS settings, use the IP address of the Raspberry Pi (usually 192.168.x.x)
as your primary DNS server, this will ensure that all DNS requests go through the AdGuard
Home software.
That’s all the configuration out the way, now we can take a look at the Dashboard.
I’ll be briefly talking through the different options that are present on the dashboard
– but as there is quite a lot I won’t be able to cover everything in intense detail.
The Dashboard is accessed by browsing to the IP address of your Raspberry Pi in your web
browser, you can then login with the credentials you set earlier.
When logged in, you’ll be able to see statistics for what AdGuard Home has been up to, as well
as what has been blocked and other network information and this will begin to populate
and fill up as more devices send DNS requests.
Useful features on this page allow you to block specific clients by their IP address
as well as look at popular queried and blocked domains, some domains have a green eye icon
which can be used to easily identify that specific domain to give you a better idea
of the traffic on your network.
There’s not too much else to this page aside from a “Disable protection” button at
the top of the page, if you’re experiencing issues connecting to something this button
could be handy when it comes to troubleshooting.
Out of the box, most of the settings should be fine for most users but you can tweak them
to adjust what gets blocked as well as add additional filter lists and enable additional
functionality such as DNS encryption, using AdGuard Home as your DHCP server and client-specific
settings if you wish to block specific services on a specific device.
The General settings are where you go to make quick adjustments to your network, these allow
you to enable additional features to block malicious or adult websites as well as enable
safe search across all devices as well as allow you to adjust logging and statistics
by AdGuard.
The DNS settings allow you to set which DNS server AdGuard will use, by default this is
set up to use Quad9, but you can change it to any provider you wish.
On this page, you can also adjust how AdGuard Home will behave when it needs to block a
connection, but these settings should be fine by default for most users, but you can tinker
if you wish.
The encryption and DHCP settings pages are more advanced, and you probably don’t need
to use these unless you already know that you’ll need them.
These are nice features to have included but will require some additional configuration
to get up and working as you’ll need to, in the case of encryption settings, set up
a wildcard SSL certificate.
The client settings page, however, you may find yourself using.
This page allows you to block services for specific devices, versus blocking them across
your whole network as well as override any global settings that are applied to all devices.
This could be handy if you want to block someone’s access to YouTube, for example, or wish to
use a different upstream DNS server such as Cloudflare.
Filters are another menu option that is present on the administration interface, filters let
us control any blocking as well as allowing through any websites (even if they are on
a blocklist).
The DNS blocklists are large lists of websites that people have created and can be used by
adblockers to block them.
By default, AdGuard uses its own block list but you can add additional ones or even add
your own.
Allowlists are the opposite of these, if you find something is being blocked by a list,
you can use an allowlist to bypass the blocklist.
You’re also able to easily block predefined online services with a simple toggle, this
is good if you want to be able to quickly block access to a social network, game servers
or video streaming sites.
There are also a couple of advanced options here as well, these allow you to rewrite DNS
requests as well as manually enter in your own custom filtering rules.
I won’t go into these now, but they’re nice features to have in case you need them
in the future.
The final page along the menu bar is the query log, this is a log of everything AdGuard Home
gets up to and can be used to see what’s being blocked and how long AdGuard Home is
taking to perform DNS resolutions.
This page also allows you to block domains if you see something which you think shouldn’t
be getting through.
That’s all there really is to AdGuard Home, it’s surprisingly straightforward to get
up and running and most things should be set up out of the box for how most users will
be using it.
I like how AdGuard Home presents itself in an approachable way but still has some quite
powerful features and options available to advanced users and even further configuration
can be from the command line.
That’s been how to set up an ad blocker and filter across your entire network, allowing
you to free up resources on your individual systems and keep any junk traffic out of your
network.
If you found this tutorial helpful please consider subscribing and I will see you in
the next video.