Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to deny all sites except a few? (using Squid)

Status
Not open for further replies.

meekrob

MIS
Feb 13, 2002
127
US
What kind of ACL's do I set up to deny all sites exept two domains using the squid proxy?
 
acl all dst 0.0.0.0/0.0.0.0
acl access_domains dstdomain .domain1.tld .domain2.tld. . domainXY.tld

http_access allow access_domains
http_access deny all

this way.
 
Hi,
this is a bit of my squid.conf that I set up a few months ago.


acl all src 0.0.0.0/0.0.0.0
acl mylan src 192.168.0.0/16

acl banned url_regex "/etc/squid/banned.txt"

http_access deny banned
http_access allow mylan
http_access deny all



The file banned.txt will contain a list of urls that you wish to deny access to.

For example
fred.com will prevent access to ANYTHING.fred.com
pornsex will prevent access to any page/url with the word pornsex
banned.htm will prevent access to any page with banned.htm in it.
will prevent access to

Best Regards

Phil Blythe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top