LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How To Block Sites Using Squid In Linux (https://www.linuxquestions.org/questions/linux-networking-3/how-to-block-sites-using-squid-in-linux-597019/)

saha.sandipan 11-04-2007 06:07 AM

How To Block Sites Using Squid In Linux
 
How to block sites using SQUId. the conventional was like using regex.. failed.... Plz suggest.........

vanstra 11-04-2007 06:42 AM

Use http://www.dansguardian.org.

edclancy7715 11-04-2007 09:45 AM

Quote:

Originally Posted by saha.sandipan (Post 2947684)
How to block sites using SQUId. the conventional was like using regex.. failed.... Plz suggest.........

A really simple and extremely dynamic/flexible solution would be to go to www.opendns.com. Then sign up for a FREE dns account. Set it up on your gateway (will have to change it from automatically receiving DNS servers from ISP) and then log into their web configuration interface from their homepage. From there you can check your DNS Lookup statistics, disable certain hosts from being DNS resolved, it also can filter phish and spam! Then you could configure it remotely as well...
I think that method would be compatible with your squid.

win32sux 11-04-2007 04:00 PM

The methods suggested above would be okay for some people, but neither of them use Squid for the blocking - which is what has been asked. The simplest way to block sites with Squid is to use a dstdomain ACL. Lets say for example you want to block Slashdot.org, Freshmeat.net, and DistroWatch.com for clients on the 192.168.1.0/255.255.255.0 subnetwork:
Code:

acl my_subnetwork src 192.168.1.0/255.255.255.0
acl blocked_sites dstdomain .slashdot.org
acl blocked_sites dstdomain .freshmeat.net
acl blocked_sites dstdomain .distrowatch.com
http_access deny blocked_sites my_subnetwork



All times are GMT -5. The time now is 08:55 PM.