What is AdGuard? AdGuard is a privacy protection and ad blocking suite that works on browsers and apps:
Ad blocking: Blocks ads, pop-ups, banners, text ads, and video ads
Privacy protection: Blocks third-party tracking systems, domains that spread malware, and crypto-jackers
Other features: Speeds up page loading, saves bandwidth, and can protect children from inappropriate content.
While AdGuard is not perfect, but for us it is an amazing tool to add to your bag of tricks. AdGuard can be purchased from AdGuard as a software install, a browser plug in, or as a free stand alone for your network.
Today we are going to focus on the stand alone for your network.
First things first, your going to need a static IP for your little vps your setting up in your home lab. If you don’t have a home lab, you can get a small vps for $5/month and it will work just fine for this.
The specs for this are pretty lightweight,
1vCPU
1GB RAM
10GB Disk Space
Ubuntu 22 * I use 22 personally
We are going to assume you have the some basic linux understanding, and are able to copy/paste command and also know how to connect and at least run a few commands.
So lets get started.
First things first, lets connect to our vps, update it, change the password, and install the firewall.
passwd
apt install wget ufw -y
ufw allow 22
ufw allow 53
ufw allow 67
ufw allow 68
ufw allow 80
ufw allow 443
ufw allow 853
ufw allow 3000
ufw enable
apt-get update && apt-get upgrade -y
Now this is not a have to, but I always reboot at this time, as we just updated a ton of things.
Next we have to stop some services.
systemctl stop systemd-resolved
systemctl disable systemd-resolved
Now lets get into the super easy and stuff, installind AdGuard.
wget https://static.adtidy.org/adguardhome/release/AdGuardHome_linux_amd64.tar.gz -O AdGuardHome.tar.gz
tar xvf AdGuardHome.tar.gz
cd AdGuardHome/
./AdGuardHome -s install
Now follow the simple instructions on screen which will take you about 45 seconds, and poof your off. Next were going to want to open up our browser of choice, and go to the URL it gave you during the install.
At this part, it is going to ask you to create a Username and Password. That is pretty much it! You are now ready to add a few block lists and your off!
Once you create that username, it will then prompt you to login, please login. Once logged in you will see the following screen.

Now keep in mind, your DNS Queries and Blocked by Filters will be at 0.
Now head over to Filters -> DNS Blocklists

Now were going to add personally two lists, that I use to help weed out some big time list, and we are going to check another one, and update them.

What I personally do it check the AdAway Default Blocklist, and then add the following two.
https://github.com/ppfeufer/adguard-filter-list/blob/master/blocklist?raw=true
https://raw.githubusercontent.com/hagezi/dns-blocklists/main/adblock/spam-tlds.txt
To do this, lets click the following.



Ok that is it for the adding of the major lists! Now please note there are millions and millions of other sites/lists you can add, but your going to have to dig for them, and figure out what your looking for, or wanting to bulk block.
Now lets do one white listing.
So now click on Filters -> Custom filtering rules.

Were going to add one Google rule.This will allow fonts to load, as to allow many sites to display as they should.

Create the rule of:
@@||fonts.gstatic.com^$important
Hit apply and your good!
Now you should be able to setup your DNS settings either in your router for all your computers and phones to work on your network, or manually setup each device.
Now that we got this all setup, lets look at a few sites that we know has ads and see if they are all gone!


There you go! You now have a DNS Ad blocking node setup.