linux poison RSS
linux poison Email

Block Ads by using squid and Ad Zapper

It has been observed that 30% of your bandwidth is consume by Ads so if you block these ads you can save this 30% bandwidth and can use to some other things. How we can do this …

Make sure your squid is configured and working fine
Get ad-zapper using following commands:
# cd  /etc/squid
# wget
# chown  root:root  update-zapper
# chmod  700  update-zapper 
Now run the update-zapper which should automatically download the latest adzapper Perl script from sourceforge: # ./update-zapper

If the script ran properly you should now see an executable Perl script named squid_redirect
# ls  squid_redirect

Edit squid_redirect file and make sure the perl path ( command - # whereis perl) is defined according to your system


Now you want to edit the squid.conf file with your favorite text editor and search for the section containing the tag redirect_program. This is where we tell Squid to use the ad zapper script.

Edit squid.conf file and insert the following line
redirect_program /path/to/squid_redirect

Restart the squid - # service  squid   reload


Post a Comment

Related Posts with Thumbnails