LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-13-2005, 04:59 AM   #1
alvi2
Member
 
Registered: Feb 2005
Posts: 77

Rep: Reputation: 15
problem in restriction


i am using squid for proxy and iptables for nating


now every thing is fine ok

i restricted the down load on time basis for .mp3 .avi . mpeg ...... mean on multimedia files
as
acl all src 192.168.0.0/255.255.255.0
acl time_acl time 11:30-23:30
acl file_proto url_regex ftp .mp3 .mov .vob .mpeg .avi
http_access deny all time_acl file_proto

now it is working but when ever i open the site
www.altavista.com
the squid restricted page is displayed
why

i found that the above site has
altAVIsta.com mean contains the word avi that's why the error squid page is display

what can i do know , i dont want to restrict this site
similarly i found many sites that contains that like words

so how can i get rid of these things
 
Old 07-13-2005, 09:21 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
While I'm not familiar with squid, in a regular expression the period (".") is a wildcard; it matches any character. So ".avi" matches "tavi" in altavista. To prevent that, you usually escape the character with a backslash: \.avi

Also, your regex won't match upper or mixed case. So for example, "test.Avi" and "test.AVI" won't match. A quick google shows that url_regex has a "-i" option, to ignore case. So I would use:

acl file_proto url_regex -i ftp \.mp3 \.mov \.vob \.mpeg \.avi

This may still be problematic, because strings like "test.avisionary" or "anftpexample.txt" will match. Think carefully about the situation before establishing a filter.
 
  


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 Access Timing Restriction problem gurusmaran Linux - Security 1 10-19-2005 01:03 AM
website restriction jonfa Linux - Networking 1 05-31-2005 09:33 PM
port restriction CleonII Linux - Networking 4 05-18-2003 06:43 PM
FTP Restriction Jason_25 Linux - Networking 2 12-02-2001 04:14 AM
ip restriction ggramajo Linux - Networking 0 11-30-2001 07:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:13 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