Friday, March 7, 2008

block any URL or kyeword in squid

Block any URL or keyword in squid:
Create a text file "list.txt" in "/etc/squid/" directory.
Put the URLs or keywords in the file. One URL or keyword in a single line.
Put an ACL in "/etc/squid/squid.conf" like...
acl bannedurls url_regex -i "/etc/squid/list.txt"
Now put !listurls at the end of the acl "http_access allow ....."
Then restart squid daemon "service squid restart".

No comments:

Art Auctions starting at $1