Close
Social profiles

Block urls, keyword or file format on Squid proxy

If you want to block any url or any specific keyword you can add following lines in your squid.conf

$ su -
# vim /etc/squid/squid.conf
acl B_url url_regex "/etc/squid/Bsites1"
http_access deny B_url

Then you have to create the B_url, B_keyword and B_extension files on /etc/squid directory.

$ su -
# cd /etc/squid
vim Bsites1

Content of Bsites.acl

filesonic
rapidshare
megaupload
mediafire
2shared
fileserve
wupload
mp3
crictime

You can use any one of the following commands to reload the squid after making changes to squid.conf file.

# /usr/sbin/squid -k reconfigure
# /etc/init.d/squid reload

3 thoughts on “Block urls, keyword or file format on Squid proxy”

  1. I simply want to say I am just very new to blogs and actually liked your web site. Most likely I’m going to bookmark your blog post . You amazingly have wonderful stories. Cheers for sharing with us your web page.

Leave a Reply

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

Close