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.
It can be downloaded from here
Basic setup is straightforward and quick:
sudo apt-get install privoxy sudo nano /etc/privoxy/config
Then start it up:
and that is it.
Then just change proxy settings in Firefox and go to: http://config.privoxy.org/ and if everything is setup correctly you’ll see something like this:
and to verify that Internet ad-crap is blocked open http://adclickmedia.com/ website and you should see: