Although browser adds blockers block trackers/ads they are not perfect; for example, they are only useful inside the browser not in applications or games or devices like TVs. There is a simple open-source yet powerful solution for this problem: Pi-Hole.
Pi-Hole is a network-wide Ad Blocking software functions similarly to a network firewall. It acts as a local DNS Server with a big database of trackers, ads and nefarious domains.
E.g. example.com is a tracker domain, your application inside your phones requests example.com to retrieves the ads or sends your tracking information; first, to look up, it’s the server IP address it tries to lookup it inside Pi-Hole DNS Sinkhole, and Pi-Hole rejects the request and won’t let it to go any further!
Pi-Hole and Asus Routers
I don’t want to talk about Pi-Hole installation because there are plenty ways of installing it and there are really good article or videos.
Before we go any further; first install Pi-Hole on a device that is always-on for 24/7; because this device is going to act as the whole network DNS server if it gets off you cannot open any websites. I installed it on my Raspberry Pie because it’s light-weight, doesn’t consume lots of energy and it’s always-on.
During Pi-Hole installation; the Pi-Hole installer asks you to set the static IP address for the Pi-Hole, remember that IP Address.
E.g. this is our home network:
IP Range: 192.168.1.2 ~ 192.168.1.254
Subnet Mask: 255.255.255.0
Gateway: 192.168.1.1 (your router IP Address)
Pi-Hole IP: 192.168.1.2
💡 IP Range, Subnet Mask, Gateway, etc. might be different for your network.
Step 1 — Pi-Hole DNS Settings
- Login to Pi-Hole Admin (E.g. 192.168.1.2/admin)
- Go to the settings then go to DNS tab.
First, in the Upstream DNS Servers, pick your desired DNS server. I recommend choosing a Cloudflare(18.104.22.168) because of performance and privacy.
Scroll down a bit then in “Advanced DNS settings” uncheck “Never forward non-FQDNs” and “Never forward reverse lookups for private IP ranges”
Check “Use Conditional Forwarding” and enter your local network and router IP in the fields.
Step-2 Asus Router DNS Setting
Login to Asus router admin, Inside WAN settings and Internet Connection Tab, scroll to the WAN DNS section and make settings like this:
💡 I used Cloudflare DNS servers here, use your desired DNS server.
Save the changes and go the LAN settings, DHCP Tab and DNS and WINS Server setting and make the settings like below:
In DNS Server 1, enter Pi-Hole IP Address and Select No for Advertise router’s IP and Save the changes.
Now it’s just a matter of time for your clients to get the new DNS settings, after a while in Pi-Hole dashboard you can see request are coming.