Install Squid on your machine.
In /etc/squid3/squid.conf, under the line:
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
Insert these lines above any network rules you have:
# WEB FILTERING
acl bad url_regex –i “/etc/squid3/squid-block.acl”
http_access deny bad
Create the file "squid-block.acl". This file will store the url regular expressions you want to block.
Restart Squid to apply the changes:
# sudo service squid3 restart
Example squid-block.acl contents:
myspace.com
faceboook.com
This will block any url that contains "myspace.com" or "facebook.com".
No comments:
Post a Comment