LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to block a Website in Squid (https://www.linuxquestions.org/questions/linux-networking-3/how-to-block-a-website-in-squid-417815/)

winxlinx 02-20-2006 11:08 PM

How to block a Website in Squid
 
Hi everyone,
i am using squid in redhat 9

i can able to make general options in squid but i want know to how to blocking sites in squid.

gilead 02-21-2006 04:40 PM

You can block sites in squid's squid.conf file. If you know the domain that you want to block, you can create an access control list (acl) entry for it and then deny access to that acl. For example:
Code:

acl doubleclick  dstdomain .doubleclick.net
http_access deny doubleclick

If you don't know the full name of the domain, but you know it contains a particular pattern (e.g. sex) you can block it with a regular expression:
Code:

acl blocksex dstdom_regex -i sex
http_access deny blocksex

It's important where you put these lines in the file - search for TAG: acl and TAG: http_access and follow the suggestions in the default file for securing access to your proxy.


All times are GMT -5. The time now is 11:26 PM.