Linux Forums - Linux Help,Advice & support community:LinuxSolved.com

Network Troublshooting => Linux Proxy Server Support => Topic started by: clmorre on April 19, 2006, 05:38:38 AM

Title: Blocking www.xxx.com
Post by: clmorre on April 19, 2006, 05:38:38 AM
Linux gurus,
     
       How can I block a specific website using squid?Please reply ASAP.
Title: Blocking www.xxx.com
Post by: ilias on April 19, 2006, 09:22:30 AM
For ASAP reply, browse the forum, you will get indepth answers for your request
Title: The way to block website that we want !
Post by: sothy on April 20, 2006, 02:09:12 AM
Dear sir

 # Linux gurus,

How can I block a specific website using squid?Please reply ASAP

//////////////////////////////////////////////////////////////////

         I have one solution that can block user for surffing xxx wesite or download but useing in squid.conf :

Suppose u wana block download for tthe ip's ranges from 192.168.8.1-192.168.8.14
First make an acl
acl clients src 192.168.8.1-192.168.8.14

After that , make a file in /etc directory and name it block
Just add as meny exetentions which u want to block ..i.e suppose u wana block exe and zip download

Just add the entries in that file like this
.exe$
.zip$

Save the file and exit
After that just add a new acl name it download
acl download url_regex -i "/etc/block"
and just add this below line in last
http_access deny clients download
http_access allow all
/////////////////////////////// and remember that in file block( /etc/block) you can block website both that you just type website that you want :
ex: http://www.xxx.com
and then save and restart squid so all client that you want block it can't surffing again . i hope my solution will get you success :)

Regard

Sothy