Implementing Privoxy on PFSense Router Firewall

On this occasion, let's try to discuss how to install and configure Privoxy on the PFSense Router. Before reviewing in more depth, it's a good idea to first get to know what Privoxy is. Privoxy is a non-caching web proxy with filtering capabilities to enhance privacy, modifying web page data and HTTP headers before the page is rendered by the browser. Privoxy is a "privacy-enhancing proxy," filtering Web pages and removing ads. Privoxy can be customized by the user, for both stand-alone systems and multi-user networks.

Privoxy is based on Internet Junkbuster and released under the GNU General Public License. One of the main uses of privacy is to limit ″internet junk″ such as pop-up ads and other annoyances. Privoxy is often used in combination with Tor or Squid and can be used to bypass Internet censorship. After you know what Privoxy is, we can start installing Privoxy.

A. Instalasi Privoxy

To install Privoxy on a PFSense Router, the steps are almost the same as installing Tor on a PFSense Router. If you read the previous article, you will definitely have no difficulty installing Privoxy. We open the PUTTY remote console, log in with our PFSense Router LAN IP, namely In the Shell PUTTY menu, type the following script to install Privoxy "pkg install privoxy".

After installing Privoxy is complete, we continue by creating a boot script in the rc.conf file, the aim is so that every time the PFSense Router is turned off the Privoxy application can run automatically. Enter the script privoxy_enable="YES" in the rc.conf file.

[2.6.0-RELEASE][]/root: ee /etc/rc.conf


A. Privoxy Configuration

The main file in Privoxy is the config file in the /usr/local/etc/privoxy folder. This file is what we will configure, in this file socks5 Tor will be forwarded. At the end of the installation the config file is not in the /usr/local/etc/privoxy folder, we have to copy it from the /usr/local/share/examples/privoxy folder.

[2.6.0-RELEASE][]/root: cd /usr/local/share/examples/privoxy
[2.6.0-RELEASE][]/usr/local/share/examples/privoxy: cp config /usr/local/etc/privoxy

After that, we edit Privoxy's config file. To make it easier to edit the config file, use the WINSCP application, the steps are the same as PUTTY, you log in with the PFSense router's LAN IP, namely We don't change all the config file scripts, only some of them, follow the following script guide:

logdir /var/log/privoxy
logfile logfile
toggle 1
buffer-limit 4096
forward-socks5   / .

Listen-address is the IP address and Privoxy Port
forward-socks5 is the IP address and Tor Port
So it's explained, Privoxy forwards to socks5 on the Tor IP and Port.
After finishing editing the config file, we continue by creating the rc.d privoxy startup script in the /usr/local/etc/rc.d folder.

[2.6.0-RELEASE][]/root: cd /usr/local/etc/rc.d
[2.6.0-RELEASE][]/usr/local/etc/rc.d: mv privoxy

We continue by creating the file in the /usr/local/bin folder, then enter the following script in the file.

[2.6.0-RELEASE][]/root: touch /usr/local/bin/
[2.6.0-RELEASE][]/root: chmod +x /usr/local/bin/
[2.6.0-RELEASE][]/root: ee /usr/local/bin/

#!/usr/bin/env sh
service /usr/local/etc/rc.d/ status > /dev/null
if [ $% != 0 ]; then
service /usr/local/etc/rc.d/ start

Now we go to the PFSense Web GUI, edit the crontab file, click Services>>>Cron>>>Settings, then click the Add button.

After creating the crontab file, it means all stages have been completed. Now we restart the Privoxy application. Use the service script restart.
[2.6.0-RELEASE][]/root: service restart
Stopping privoxy.
Waiting for PIDS: 35839.
Starting privoxy.

The words PIDS: 35839 and Starting privoxy indicate that the Privoxy application is RUNNING on the PFSense Router server. This means that now your PFSense Router has Privoxy installed properly. In practice, you can combine Privoxy with the Tor or Polipo application and you can even combine it with Squid proxy.
Iwan Setiawan

I Like Adventure: Mahameru Mount, Rinjani Mount I Like Writer FreeBSD

Post a Comment

Previous Post Next Post