Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 02-20-2006, 11:08 PM   #1
LQ Newbie
Registered: Feb 2006
Posts: 29

Rep: Reputation: 15
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.
Old 02-21-2006, 04:40 PM   #2
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,125

Rep: Reputation: 164Reputation: 164
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:
acl doubleclick   dstdomain
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:
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
access the block website by certain IP space_beyond Linux - Security 1 06-03-2005 12:33 AM
how to open and block the ports in squid.... shahg_shahg Linux - Security 1 04-28-2005 06:01 PM
How many ways can u block a website? debug019 Linux - Newbie 4 11-07-2004 10:34 PM
How can i block msn through squid linuxeagle Linux - Networking 5 04-08-2004 09:08 AM
how to block sites with squid.conf boakiba Linux - Networking 1 08-11-2003 05:45 AM

All times are GMT -5. The time now is 10:13 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration