Quote:
Originally Posted by asliyanage
no, i need to know how to use squid to restrict some sites.
can anyone give me any link for tutorials or any reference.
|
A
quick search will provide you with tons of good tutorials.
Once you've got Squid up and running, you'll need to decide whether you want to do whitelisting (deny access to all sites, with certain exceptions) or blacklisting (allow access to all sites, with certain exceptions). Doing this sort of thing is basically just a matter of using an
ACL built with the
dstdomain type, along with an accompanying ACL rule.
Example whitelist:
Code:
acl good_sites dstdomain .linuxquestions.org
acl good_sites dstdomain .freshmeat.net
acl good_sites dstdomain .reuters.com
http_access allow good_sites
http_access deny all
This would mean only those three sites would be accessible.
Example blacklist:
Code:
acl bad_sites dstdomain .microsoft.com
acl bad_sites dstdomain .msn.com
acl bad_sites dstdomain .bing.com
http_access deny bad_sites
http_access allow all
This would mean all sites would be accessible, except those three.
The links/examples I provided should give you an idea of what this involves. Depending on what your situation is (you haven't really elaborated on it), a more complex configuration might be necessary. Also, it's quite common to use additional tools (such as
iptables, for example) in order to obtain a more reasonable level of security.
EDIT: I've taken the liberty of giving this thread a more descriptive title.