How to Block Ads on Your Web Browsers Using Privoxy

There are many browser specific plug-ins (eg. Adblock Plus) available to block ads while browsing. If you want a tool compatible for all browsers, then you should try Privoxy.

Privoxy is a non-caching web proxy with advanced filtering capabilities for enhancing privacy, modifying web page data and HTTP headers, controlling access, and removing ads and other obnoxious Internet junk. Privoxy has a flexible configuration and can be customized to suit individual needs and tastes. It has application for both stand-alone systems and multi-user networks.

Install Privoxy on Ubuntu/Linux Mint/Debian

sk@sk:~$ sudo apt-get install privoxy

Install Privoxy on CentOS/RHEL/Scientific Linux

Privoxy will not be found in official repositories. So let us install EPEL repository:

[root@server ~]# rpm -ivh

Now install Privoxy using the following command:

[root@server ~]# yum install privoxy -y

Start Privoxy service

In Ubuntu/Linux Mint/Debian:

sk@sk:~$ sudo /etc/init.d/privoxy start

In CentOS/RHEL/Scientific Linux:

[root@server ~]# service privoxy start

Configure Web browser

Now open your web browser Proxy settings and set the proxy host as and port number as 8118.

Connection Settings_004

Test Privoxy

This is how my Yahoo home page looks before I enable Privoxy.

Yahoo! India - Mozilla Firefox_005

You can see the ads on left side of my Yahoo page. After enabling Privoxy, this is how my Yahoo page looks.

Yahoo! India - Mozilla Firefox_006

Now the ads are gone. That’s it.