April 19, 2024, 02:40:52 PM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: how to block downloads  (Read 4133 times)

Offline sathish

  • Linux Learner
  • ***
  • Posts: 73
how to block downloads
« on: May 17, 2005, 11:24:00 AM »
Hi linux team,,,


I have configured redhat 9.0 server with masquerading and proxy server squid.

now i want to stop access to extension files  like .jpg, .jpeg .bat .zip .......and .exe files from downloading from the browser.....

i have done like this......

acl baddomains url_regex -i "/etc/squid/domains.ban"
http_access deny baddomains

in the file domains.ban i have included
.jpg
.jpeg
.exe
.bat
.zip

itz worked fine.. itz not giving permission to download here i am in success in making

. .. now my real world problem is here.. in the  google if the search the word like exercise or exercises

itz not giving permission to search that particular word..access denied.... i came to know that squid had searched that domains.ban file and itz contains .exe   so itz access denied.

how to solve this problem ??

my question is not to downloading any files.. and it should not link with the text/whichever we mentioned in the ban list. ??

Thanks in advance.

Sathish

Offline Ricky

  • LST CareTaker
  • Specially Skilled
  • *****
  • Posts: 2381
how to block downloads
« Reply #1 on: May 18, 2005, 05:34:05 AM »
Ya there is solution for that ;) ..

but I am not sure hence you have to give it a try..
instead of giving simple entry in your squid ban text file. Give as following...
Code: [Select]

\.exe$
\.jpg$
\.jpe$
\.bat$
\.zip $


That will it will only block those files which are having those words as suffix !