Raspberry Pi: Squid & Privoxy in the home network

Raspberry Pi Logo
Raspberry Pi Logo

If you are looking for a small computer for various tasks in your home network, you should consider the Raspberry Pi. For about 50 Euro you can get a complete system, which can be used as a firewall, media player, web server or weather station with appropriate sensors. The possibilities are unlimited, there are many different projects.

The Raspberry Pi is a small single-board computer based on an ARM-SoC: a BCM 2825 whose main processor ARM1176JZF-S is clocked at 700 MHz (and can easily be overclocked to 900 MHz). The system has two USB ports, a LAN port and an SD card slot. The operating system is installed on an SD card, in my case I use Raspbian, which is based on Debian.

Squid and Privoxy: caching and ad blocker

If you use an Apple device at home (for example an iPad) you cannot use an adblocker without jailbreak. However, many forms of advertising do not work properly. Here the Raspberry Pi comes into play, on which I installed Squid (as cache) and Privoxy (i.e. ad filter) as proxy chain. Since Debian 7.0 is the basis, it is quite simple:

# sudo aptitude install squid privoxy

After this is done, you have to build a proxy chain (proxy-chain) from Squid and Privoxy, so that the ad-free pages are kept in the cache. This reduces the load on the Raspberry Pi, because the filters don't have to be applied to every request. Search in /etc/squid/squid.conf for "cache_peer" and enter the specifications for Privoxy there:

cache_peer localhost parent 8118 0 default no-query no-digest
never_direct allow all

If you want to use the Adblock Plus filter lists with Privoxy, you can use the corresponding Script from the Ubuntu community use. On the iPad, the appropriate proxy must then be set for the WLAN connection being used. Squid is specified here: 3128 is the default port under which the caching proxy can be reached.

Raspberry Pi: with better cooling stable 900 MHz
Raspberry Pi: with better cooling stable 900 MHz

If you want more power, you can simply overclock the Raspberry Pi using the configuration tool: instead of 700 MHz, the system then runs at 900 MHz, which allows a little more air for working as a proxy. In return, a slightly better cooling is useful, which can easily be achieved with flat, passive heat sinks. I have created a short video about this (see below). Of course overclocking is always a risk, so you should be careful with it.
The Raspberry Pi mini-calculator is really an exciting device, with which many more or less meaningful projects can be realized - since the software is simply installed on SD card, you can easily try different things with different SD cards. I will also do other things with the Raspberry Pi - what exactly, I don't know yet 😉

Bqeel Raspberry Pi 4 Model B 8GB Ultimate Kit with 32GB Class10 Micro SD Card, 5.1V 3.0A USB-C On/Off Switching Power Supply, 3 Premium Copper Heatsinks, Premium Black Case
362 reviews
Bqeel Raspberry Pi 4 Model B 8GB Ultimate Kit with 32GB Class10 Micro SD Card, 5.1V 3.0A USB-C On/Off Switching Power Supply, 3 Premium Copper Heatsinks, Premium Black Case
  • 🍓【Raspberry Pi 4 Model B 8GB 】:Raspberry Pi 4 Model B is the latest product of Raspberry series with new Broadcom BCM2711, quad-core Cortex-A72 (ARM v8) 64-bit at 1.5 GHz.
  • 🍓【8G RAM + 32G TF Card】: 32GB Micro SD card with NOOBS system pre-installed. There is also a card reader for Raspberry Pi 4 model B. Enough storage space to load your OS and store data. The Raspberry Pi 4b has an improved USB capacity.2* USB 2.0 ports and 2*USB 3.0 ports, which can transfer data up to ten times faster.
  • 🍓【4K 60Hz + 1080p Resolution】: The Bqeel Raspberry Pi 4 Starter Kit includes a high quality 4K60Hz micro HDMI to HDMI cable to ensure the best output display resolution support.
  • 🍓【WIFI 2.4G&5G/BT5.0】: Supports HEVC 4K streams at 60 fps and manages 2 screens in 4K. Dual band 802.11b / g / n / ac WLAN (2.4 / 5.0 GHz) and Bluetooth 5.0 module.
  • 🍓【Scope of Supply】:Includes a premium black case for the Raspberry Pi 4 B Starter Kit with easy access to all ports, removable cover for access to GPI0 and vent, and a set of 3 premium copper heatsinks and a fan to keep the Pi 4 cool.

Last updated on 2021-03-01 at 08:45 / Affiliate Links / Images from the Amazon Product Advertising API

5 thoughts on “Raspberry Pi: Squid & Privoxy im Heimnetz”

  1. Hello!
    Thanks for the good instructions. With a current Raspbian in the Squid configuration I had to additionally allow access to Squid from the local network. By default only requests from localhost are allowed. Therefore I had to replace "http_access allow localhost" in squid.conf with "http_access allow localnet". With "acl localnet src" the local network can be specified, but the private address ranges are already entered by default.


  2. Well done, only one problem. the truth is that free blacklists are shit.

    We have a better solution, blacklisting has evolved, and we are ready to serve the needs of all of your content filtering applications with our superior logic, blacklists from squidblacklist.org are hands down, the best blacklists available for content filtering purposes. We think you will agree.

    We want to serve you, all of you


Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top