contenta-verify-dbb69181ba63e3b7
24.2 C
New York
June 17, 2026
GstechZone
Tech

How I block adverts with a $7 Raspberry Pi different – it is simple


A $7 ESP32-S3 is a powerful and versatile system
Adrian Kingsley-Hughes/ZDNET

Comply with ZDNET: Add us as a preferred source on Google.


ZDNET’s key takeaways

  • An inexpensive $7 board can flip its hand to advert blocking.
  • It really works as a DNS sinkhole, stripping out adverts earlier than obtain.
  • Different choices embody utilizing a Raspberry Pi and shopping for {hardware}.

They are saying that necessity is the mom of invention, and the skyrocketing costs of Raspberry Pi boards have positively been the kick within the pants that I’ve wanted to have a look at cheaper, maybe additionally better-suited, options. I imply, the Pi is a great boardhowever for lots of functions I’ve used it for over the virtually 15 years that they have been round, it is also been overkill.

The opposite day, I wanted to place collectively an ad-block answer, not as a result of I dislike adverts, however just because I used to be working with fairly a restricted bandwidth. I reflexively reached for a Raspberry Pi board, however stopped once I remembered how a lot they price these days and put it again.

Additionally: I tested a Bluetooth tracker that leverages LoRa mesh networks to find things – and it’s so accurate

I used to be going to make use of PiHole on the Pi, however then I remembered coming throughout an ad-block project that labored on an ESP32 board. And the excellent news is that you would be able to decide up a kind of boards for underneath $10.

ESP32-S3 (left) vs ESP32 (right)

ESP32-S3 (left) vs ESP32 (proper).

Adrian Kingsley-Hughes/ZDNET

Introducing the ESP32-S3

There’s an enormous distinction between a Raspberry Pi 5 and an ESP32 board (particularly the ESP32-S3 board). The Pi 5 is powered by a 2.4 GHz quad-core Arm Cortex-A76 64-bit chip, gigabytes of RAM, and the power to make use of microSD or quick NVMe SSD storage, whereas the ESP32 makes use of a dual-core Tensilica Xtensa LX7 32-bit processor that may run at as much as 240 MHz, 520 KB of RAM, and as much as 16MB of flash storage. A Pi 5 can use as a lot as 12 W of energy (and that is earlier than you hook up varied HATs and such), whereas an ESP32 board makes use of milliwatts.

For this undertaking, I am completely satisfied to go along with the ESP32, however there are a number of compromises that I am going to need to stay with — extra on these later.

What you want

First, you want an ESP32 board. Search for the ESP32-S3 with 8MB of PSRAM (there is a 4MB model too, however utilizing this board will end in compromises) reasonably than the traditional ESP32. The ESP32-S3 is quicker and extra environment friendly, and also you want this energy to run the ad-block software program. The most affordable means to purchase these boards is in a 3-pack for $20.

Additionally: I built my own Wi-Fi router with a Raspberry Pi for Starlink and solar control – here’s how

Whenever you get an ESP32-S3 board for the primary time, it is regular to assume, “Wow, that is tiny, there have to be extra to it,” however there is not. It truly is a pc you possibly can steadiness on a finger.

Properly, you’ll need a USB-C cable to switch information and energy the board. Nevertheless, you do not even want a microSD card for the board to work.

Additionally: I installed a $17 solar panel onto my doorbell camera, and it’s easily my best smart home investment

Speaking of the software program, you may additionally must obtain ESP32_AdBlockerwhich does all of the arduous work. You may additionally want the Arduino IDE utility to put in the software program onto the board. Putting in the software program is simple — configure the Arduino IDE utility to work with the ESP32 boardopen the product within the utility, join the board to your PC, and click on add.

No coding needed -- you're just loading existing code onto the ESP32-S3.

No coding wanted. Simply load current code onto the ESP32-S3.

Adrian Kingsley-Hughes/ZDNET

Notice that whenever you join the ESP32-S3 board to your laptop, it has two USB ports. You need the one marked as COM or USB/Native (wanting down on the board with the ports on the backside, that is the port on the precise). Alternatively, attempt a distinct port.

Additionally: I setup a $4 router reboot timer, and it’s made my internet reliably faster

If you happen to get into hassle, there’s no end of help available. One of many greatest points I discover individuals run into is attempting to attach the ESP32 to their laptop utilizing a charge-only USB-C cable. I additionally needed to fiddle with the compile and board settings within the Arduino IDE software program. I’ve added a screenshot beneath of the settings I used to get issues working.

ESP32-S3 (left) vs ESP32 (right)
Screenshot by Adrian Kingsley-Hughes/ZDNET

And eventually, for those who want a case for the ESP32-S3 board, you’ve choices. You possibly can buy one, 3D print oneor do a MacGyver and wrap it in a little bit of electrical tape or large-diameter shrink-wrap tubing (about 1.5 inches throughout).

Establishing the board

OK, so you’ve got loaded the software program onto the ESP32. Now it is time for a primary boot and to get the board arrange. Your ESP32 board is now a community equipment.

On first boot, the ESP32 begins in Wi-Fi entry level mode with an tackle that begins: ESP32_Adblocker_XXXXXXXXXXXX (the place every X is an alphanumeric character).

It lives.
Screenshot by Adrian Kingsley-Hughes/ZDNET

As soon as you’ve got linked to the Wi-Fi, go to 192.168.4.1 and add the Wi-Fi SSID and password in your router. After one other reboot, it is time to specify the URL of the blocklist you wish to use (yow will discover an enormous repository of blocklists here), and you then’re just about executed with the board.

We're in! ESP32_Adblocker successfully installed

We’re in. ESP32_Adblocker efficiently put in.

Screenshot by Adrian Kingsley-Hughes/ZDNET

The one different factor to do is configure your gadgets to ship DNS requests (extra on this in a second) to the ESP32 board. To do that, it is advisable take that earlier tackle — 192.168.4.1 — and use it because the DNS tackle. A great way to learn how to do that process is to take a look at CloudFlare’s excellent documentation for the platforms (keep in mind to set the DNS to your ESP32’s tackle, not CloudFlare’s 1.1.1.1 tackle).

However how does it work?

Whenever you sort a URL or click on a hyperlink, your browser must know the place on the web that internet web page lives. To search out this data, your browser consults a web based listing known as a DNS server through DNS lookup (DNS stands for Area Naming System).

Consider DNS as a telephone listing, however for server addresses. The net web page, and all of the elements of that internet web page — the photographs, any movies or sounds or animated under-construction GIFs, and, in fact, the adverts — can all be on the identical location or come from completely different servers scattered all all over the world. The browser appears up the addresses of the place all these components of the webpage are saved to construct the web page that it exhibits you.

Now, this is the intelligent bit. Since you now informed your smartphone, PC, or router to ask the ESP32 board for DNS data (which is why you needed to change the router’s DNS setting for this strategy to work), each DNS lookup that occurs is filtered by that tiny ESP32 board first.

Additionally: My 7 essential laptop-bag items after decades of working remotely

The ESP32_AdBlocker software program holds a blocklist of tens of millions of addresses for web adverts, and, put merely, each time the browser requests one thing that is within the blocklist, the software program tells the browser that it may possibly’t be discovered by pointing it to the 0.0.0.0 DNS tackle, and the blocked advert by no means masses, saving you a little bit of web bandwidth. If the tackle isn’t on that record, the board passes that DNS lookup to a correct DNS server.

What you’ve got constructed is a DNS sinkhole for almost all of the adverts that you simply see on the web.

There are limitations. For instance, the technique would not work with YouTube adverts as a result of they’re served from the identical server and on the identical tackle because the movies you wish to watch, so blocking these adverts would block the movies. The strategy additionally would not work with newer IPv6 web addresses.

Additionally: I tested a $15 smart switch and found a coffee maker wasting $1,500 a year in electricity

However this undertaking nonetheless exhibits what’s achievable with a tiny board costing underneath $10.

The ESP32-S3 in action filtering ads.

The ESP32-S3 in motion, filtering adverts.

Adrian Kingsley-Hughes/ZDNET

Not the one possibility

For the applying I wanted — a brief answer to work with a limited-bandwidth web connection — this strategy works. And it was a kind of fascinating initiatives to play with. If I wished a long-term answer, or I did not wish to put a velocity bump on a quick web pipe, a Raspberry Pi Zero 2 W operating PiHole is an efficient answer. However that strategy already pushes the associated fee as much as not less than $15 for the naked board, plus a microSD card. Nothing that is going to demand a second mortgage, nevertheless it’s a distinct stage for positive.

You might run PiHome on a very separate laptop, or in a digital machine on a pc. Or buy an appliance that supports ad blocking out of the box. However what is the enjoyable in that? Completely different horses for various programs.





Source link

Related posts

The Verge’s 2026 Mom’s Day reward information

nabeelhassan565@gmail.com

Sleep Quantity ComfortNext Lux Sensible Mattress: Redefining Assist

New leaders, new fund: Sequoia has raised $7B to broaden its AI bets