Blocking Ads (Solutions)

I would like to implement something in OpenWrt to block ads, all the typical functional requirements met by the likes of AdGuard.

I'll be using a D-Link DIR2660 which has 256MB RAM and 128NAND. I have a spare D-Link to play whilst I get things configured correctly and I've already expanded the storage space via extroot config as I read that 128NAND would probably not be enough.

My main D-Link is hardly over utilised....I had a look at the stats for the last week and it reads as....

Processor:
Average <1.0%
Highest Peak on any of the cores is 6%

System Load is <1.0%

Average Free Memory is 161M
Average Used 38M

I can see there are some lengthy topics on the forum already about different solutions and was really after a pointer to say best going with xxxx and hence avoid reading all the lengthy content of the different solutions.

Seems like AdGuardHome, AdBlock, AdBlock-Fast and AdBlock-Lean are the main candidates.

I was thinking of just ploughing on with AdGuardHome but saw some posts saying its hungry on memory and the dashboards etc can compromise overall performance?

I quite like the idea of a dashboard and ok to accept a slight performance impact but also if solution is via CLI then so be it.

What do you think will AdGuardHome be a good option given my hardware etc

Thx

I quite like blocky

256mb doesn't have to be a lot, depending on the amount of blocked DNS names.

I'd probably use AdBlock or AdBlock-lean, to maximize the free RAM for the lists.

2 Likes

I’ve used Adblock since day 1 along with a separate dnsmasq blocklist, my preference being they are reasonably simple to implement, lean and have worked brilliantly for my use case. I personally find Adguard more than a little bloated @ 9.45MB and requires a higher learning curve to implement properly.

I have not looked at either Adblock-Fast or Adblock-Lean.

1 Like

Is running on a raspberry pi an option? Ph-hole is spectacular in the role.

It is but quite like the idea of running it all on the OpenWrt platform

EDIT: I see that your router has an external USB so you could run pi-hole in a Linux container, even with the low memory. To give you an idea, I have Arch ARM running pi-hole (lighttpd) in a lxc on my MT6000 and it's only using 25 MB of RAM.

3 Likes

In my setup, I use PiHole and unbound on an orange pi.
OpenWRT rejects all UDP 53 traffic forwarded to wan.
Unbound is not used as a recursive resolver, but forwards everything to Adguard DNS (through DoT).
They are probably faster with updates in their database than the daily pihole update.

1 Like

The D-Link DIR2660 is a MIPS architecture, do you know if this architecture supports LXC?

My archer a6 v3 is ramips and I see it:

# opkg list|grep lxc-start
lxc-start - 5.0.3-r1 - Utility lxc-start from the LXC userspace tools
1 Like

I run my piholes in the cloud, for free, at Oracle.
Been doing it since 2019.

2 Likes

Thanks for the info all. I'm up and running now with AdBlock. All seems to be working well with 69000 block domains. No performance impact that I can tell. Will continue to investigate options.

I might come back to the LXC at a later date, seems interesting.

You can also use https-dns-proxy with the ad-blocking resolver, either a pre-set or a customizable one.

If OP needs to add USB storage for extroot (in order to run LXC), I would suggest getting Pi Zero with USB Stem to make it running in Ethernet gadget mode, better processing power, more resources (if you use Zero 2 then it's much better)

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.