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 - 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 11-22-2013, 05:18 AM   #1
raju_t
LQ Newbie
 
Registered: Nov 2013
Posts: 6

Rep: Reputation: Disabled
How to allow flash for particular video on youtube abd blcok for other


I used squid proxy for internet sharing. I blocked youtube and flash video in config. But want to allow specific video on youtube.

acl flash_ads rep_mime_type application/x-shockwave-flash
acl youtube_allow url_regex -i ^http://www.youtube.com/playlist\?lis...8SfwcZJErwuhiH
acl sites dstdomain .youtube.com
http_access allow youtube_allow
http_access deny sites
http_reply_access deny flash_ads

This line block all flash video . Problem is that how i can allow flash for only allowed video on youtube (Access list name is : youtube_allow) so that this video will be display and all other video will be blocked.

Pl help me to solve above problem. Thanks in advance
 
Old 11-23-2013, 10:48 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi.

Assuming that your video URL is http://www.youtube.com/watch?v=MyAllowedVideoURL, you can add another ACL like:
Code:
acl flash_ads rep_mime_type application/x-shockwave-flash
acl youtube_allow url_regex -i ^http://www.youtube.com/playlist\?lis...8SfwcZJErwuhiH
acl sites dstdomain .youtube.com
acl good_video url_regex -i ^http://www.youtube.com/watch\?v=MyAllowedVideoURL
http_access allow youtube_allow
http_access allow good_video
http_access deny sites
http_reply_access deny flash_ads
or combine the 2 ACLs like:
Quote:
acl flash_ads rep_mime_type application/x-shockwave-flash
acl youtube_allow url_regex -i ^http://www.youtube.com/playlist\?lis...8SfwcZJErwuhiH
acl sites dstdomain .youtube.com
acl good_video url_regex -i ^http://www.youtube.com/watch\?v=MyAllowedVideoURL
http_access allow youtube_allow
http_access deny sites
http_reply_access deny flash_ads !good_video
 
Old 11-25-2013, 05:25 AM   #3
raju_t
LQ Newbie
 
Registered: Nov 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thank u bathory (Guru) . Actually the squid config file contain following lines.

acl youtube_allow url_regex -i "c:/squid/etc/Allowed-youtube.acl"
acl flash_ads rep_mime_type application/x-shockwave-flash
acl sites dstdomain .youtube.com .facebook.com
http_access deny sites
http_access allow youtube_allow
http_reply_access deny flash_ads !youtube_allow

but after adding !youtube_allow it doesn't display video (ie for URL in Allowed-youtube.acl files). Pl help me How to solve this problem.
Once again thank u for supporting me.


Allowed-youtube.acl contain

http://www.youtube.com/playlist\?lis...8SfwcZJErwuhiH
http://www.youtube.com/watch\?v=nWfB...rwuhiH&index=1
http://www.youtube.com/watch\?v=Fq93...rwuhiH&index=2
http://www.youtube.com/watch\?v=_4gc...rwuhiH&index=3
http://www.youtube.com/watch\?v=mULn...rwuhiH&index=4
http://www.youtube.com/watch\?v=_inh...rwuhiH&index=5
http://www.youtube.com/watch\?v=qGU1...rwuhiH&index=6
http://www.youtube.com/watch\?v=ylxP...rwuhiH&index=7
http://www.youtube.com/watch\?v=nWfBh6uwjis
http://www.youtube.com/watch\?v=Fq93xxGnqsk
http://www.youtube.com/watch\?v=_4gchiuvo1I
http://www.youtube.com/watch\?v=mULnnK_RLes
http://www.youtube.com/watch\?v=_inhF9j_1l0
http://www.youtube.com/watch\?v=qGU1KFkDI8s
http://www.youtube.com/watch\?v=ylxPwXDsv_Y

Last edited by raju_t; 11-25-2013 at 05:27 AM.
 
Old 11-25-2013, 07:02 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

You should change the order of the "http_access" rules, so the 2 that allow access are read before the one that denies it:
Code:
acl youtube_allow url_regex -i "c:/squid/etc/Allowed-youtube.acl"
acl flash_ads rep_mime_type application/x-shockwave-flash
acl sites dstdomain .youtube.com .facebook.com
http_access allow youtube_allow
http_reply_access deny flash_ads #!youtube_allow is not necessary because of the above
http_access deny sites
Regards
 
Old 11-26-2013, 04:19 AM   #5
raju_t
LQ Newbie
 
Registered: Nov 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thank u.

I changed the sequence of allow and deny statement and remove !youtube_allow but still it doesn't display video (ie for URL in Allowed-youtube.acl files).

http_reply_access deny flash_ads this line block specific video on youtube.

Thank for support
 
Old 11-26-2013, 07:08 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
I see you're running squid on windows!
I'm not familiar with that, but I think you should use backslashes in the path to the url_regex file
Code:
acl youtube_allow url_regex -i "c:\squid\etc\Allowed-youtube.acl"
...
 
  


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
[SOLVED] Shockwave Flash not working in Youtube and others teboil12 Linux - Software 4 06-18-2012 01:43 PM
[SOLVED] Youtube - Flash problem Steve W Linux - Software 4 07-07-2011 06:15 AM
Even after following the Flash guide, I still can't use Youtube on Fedora 14 theif519 Fedora 9 05-24-2011 02:31 PM
Problem: Youtube video screen - Shockwave flash - White screen. Firefox. NOoBuntuLinux Ubuntu 5 04-29-2010 08:44 PM
some problems with flash player/ youtube dylscer Linux - Newbie 4 02-02-2010 08:13 AM

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

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