LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-20-2007, 04:51 AM   #1
pankajkarde
Member
 
Registered: Jan 2007
Posts: 41

Rep: Reputation: 15
Question download restriction over internet access using squid (proxy server)


hi friends,
i have a REDHAT centos installed machine on which i have setup the
squid as a proxy server.now with this proxy server i have applied various restrictions over internet access using ACL(acces control
list).
now i want to apply restrictions over the download from internet.

will u please help me to solve this problem?
 
Old 03-20-2007, 06:08 AM   #2
carl0ski
Member
 
Registered: Sep 2004
Location: Melbourne, Victoria Australia
Distribution: Support those that support you :)
Posts: 872
Blog Entries: 12

Rep: Reputation: 30
Quote:
Originally Posted by pankajkarde
hi friends,
i have a REDHAT centos installed machine on which i have setup the
squid as a proxy server.now with this proxy server i have applied various restrictions over internet access using ACL(acces control
list).
now i want to apply restrictions over the download from internet.

will u please help me to solve this problem?

Please elaberate

What downloads?

a $ sign symbolises a limiter

eg blocking

exe$ will block all url's that end with exe

Will block
www.flex.com/download.exe
www.flex.com/pageexe

will not block
www.flex.com/download.exe?index


[a-z]exe
will catch any letter between a and z followed by exe
eg will catch aexe bexe but not 1exe .exe etc


adding ^ means excluding, is not or inverted

[^a-z]exe
will block .exe 1exe 6exe

and not hexe gexe etc


here are the ones i use
[^a-z]exe[^a-z]
[^a-z]mp3[^a-z]
[^a-z]rm[^a-z]
[^a-z]torrent[^a-z]
[^a-z]vbs[^a-z]
[^a-z]asf[^a-z]
[^a-z]wmv[^a-z]
[^a-z]wma[^a-z]

whese will block file types but not words containing them such as arm hexen torrential sawman?
 
Old 03-20-2007, 11:38 PM   #3
runnerfrog
Member
 
Registered: Jul 2006
Location: Paraná, Argentina
Distribution: Frugalware 0.6 (Terminus) - Kubuntu 7.04 (Feisty Fawn Herd 5)
Posts: 217

Rep: Reputation: 31
Hi, pankajkarde.
Quote:
now i want to apply restrictions over the download from internet.
carl0ski already answered you what you asked. Have another example just to loose my time :

ACL's in squid.conf

acl blockedtypereq req_mime_type -i ^application/x-msmetafile$
acl blockedtypereq req_mime_type -i application/x-msmetafile
acl blockedtyperep rep_mime_type -i ^application/x-msmetafile$
acl blockedtyperep rep_mime_type -i application/x-msmetafile

acl denyext url_regex -i \.asx$ \.avi$ \.iso$ \.mp3$ \.mpeg$ \.mpg$ \.qt$ \.ram$ \.rm$ \.wav$ \.wma$ \.wmf$ \.wmv$


In ACL chain, above others in squid.conf:

http_access deny blockedtyperep all
http_access deny blockedtypereq all
http_access deny denyext


And you have the second option, my favourite: adding a content filter like Dansguardian and just editing /etc/dansguardian/bannedextensionslist file.
Cheers.

EDIT: You posted twice!. Read the rules.

Last edited by runnerfrog; 03-20-2007 at 11:57 PM.
 
1 members found this post helpful.
Old 03-21-2007, 01:01 AM   #4
pankajkarde
Member
 
Registered: Jan 2007
Posts: 41

Original Poster
Rep: Reputation: 15
hi friends,
solution which you have given to me for the download restriction is working fine.
thank you very much.
 
Old 03-21-2007, 01:04 AM   #5
pankajkarde
Member
 
Registered: Jan 2007
Posts: 41

Original Poster
Rep: Reputation: 15
Thumbs up

The solution which you have given to me for download restriction is working fine.

thank you very much.
 
  


Reply



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
squid proxy server configuration & distribution of internet without proxy gaurav_gupta082 Linux From Scratch 2 07-31-2010 11:25 AM
ftp server access through squid proxy not working hitesh_linux Linux - Networking 5 05-13-2010 03:27 AM
restriction using squid(proxy) pankajkarde Linux - Server 1 03-17-2007 04:14 PM
squid download restriction nithin_bhaskar Linux - Networking 1 09-01-2004 10:14 AM
Secure Proxy Configuration(squid) for a LAN to access Internet pune_abhishek Linux - Networking 5 11-30-2003 01:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:37 PM.

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