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 10-07-2009, 10:55 PM   #1
canzi
LQ Newbie
 
Registered: Jan 2004
Posts: 8

Rep: Reputation: 0
Wink Squid cache_peer interesting issue


Hi All

here's an interesting one for someone to grind there teeth on

i have 2 squid proxy's, proxy1 and proxy2
i want all traffic to go through proxy1 except video sites like youtube

the following config only 50% works with some youtube ect stuff still going through proxy1, (i.e. i see youtube data on proxy1 and proxy2)

Code:
acl youtube dstdomain .carins.com.au
acl youtube dstdomain .youtube.com
acl youtube dstdomain .googlevideo.com
acl youtube dstdomain .video.google.com
acl youtube dstdomain .video.msn.com
acl youtube dstdomain .video.news.com.au
acl youtube dstdomain .movies.apple.com
acl youtube dstdomain .videos.theonion.com
acl youtube dstdomain .videoegg.com

cache_peer 10.0.0.27 parent 8080 0 no-query no-digest no-netdb-exchange default
cache_peer_access 10.0.0.27 allow youtube

always_direct deny youtube
always_direct allow all
never_direct allow youtube
cheers

Steve
 
Old 10-08-2009, 10:35 AM   #2
cardy
Member
 
Registered: Jan 2005
Location: Shropshire, England, UK
Distribution: RedHat, Fedora, CentOS..........
Posts: 121

Rep: Reputation: 19
Should the following

Quote:
acl youtube dstdomain .carins.com.au
acl youtube dstdomain .youtube.com
acl youtube dstdomain .googlevideo.com
acl youtube dstdomain .video.google.com
acl youtube dstdomain .video.msn.com
acl youtube dstdomain .video.news.com.au
acl youtube dstdomain .movies.apple.com
acl youtube dstdomain .videos.theonion.com
acl youtube dstdomain .videoegg.com

be

Quote:
acl youtube dstdomain .carins.com.au .youtube.com .googlevideo.com .video.google.com .video.msn.com .video.news.com.au .movies.apple.com .videos.theonion.com .videoegg.com
Or even better

Quote:
acl youtube dstdomain "/etc/squid/youtube-domains"
with the file /etc/squid/youtube-domains containing

Quote:
.carins.com.au
.youtube.com
.googlevideo.com
.video.google.com
.video.msn.com
.video.news.com.au
.movies.apple.com
.videos.theonion.com
.videoegg.com
I am assuming the current method is redefining the list youtube with each line rather than adding to the list.
 
Old 10-08-2009, 07:38 PM   #3
canzi
LQ Newbie
 
Registered: Jan 2004
Posts: 8

Original Poster
Rep: Reputation: 0
Wink cache_peer

that indeed would be a much neater way of doing things
thanks :-)

but it has the same result
 
Old 10-09-2009, 04:11 AM   #4
cardy
Member
 
Registered: Jan 2005
Location: Shropshire, England, UK
Distribution: RedHat, Fedora, CentOS..........
Posts: 121

Rep: Reputation: 19
I did some checking and the way you have them to add individually will work.

When you get sites accessed through proxy 1 what are you getting in the log entries for proxy 1 ?
 
Old 10-11-2009, 06:56 PM   #5
canzi
LQ Newbie
 
Registered: Jan 2004
Posts: 8

Original Poster
Rep: Reputation: 0
not enough coffee

well i slept on it came in this-morning grabbed a cup of coffee
and looked at the logs

and i noticed that i was missing a key detail on proxy1!! DEFAULT_PARENT/10.0.0.27

basically its working, and just logging that the parent is doing the work :-)

i have simplified my config to the following

acl youtube dstdomain "/etc/squid/video-domains"
cache_peer 10.0.0.27 parent 8080 0 no-query default
never_direct allow youtube

thanks for your help, ill sleep on it next time ;-)
 
Old 10-12-2009, 06:14 AM   #6
cardy
Member
 
Registered: Jan 2005
Location: Shropshire, England, UK
Distribution: RedHat, Fedora, CentOS..........
Posts: 121

Rep: Reputation: 19
I'm glad you got it working. What was the default parent option that was missing off proxy 1 ?
 
  


Reply

Tags
interesting, squid



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 cache_peer priority gabsik Linux - Server 0 07-04-2008 04:36 AM
Squid cache_peer and ssl connections BerzinTehvs Linux - Software 2 04-09-2008 02:50 PM
squid cache_peer don't work jiawj Red Hat 0 11-18-2005 01:59 AM
SQUID cache_peer query wennie Linux - Software 0 02-06-2005 12:26 AM
Squid Cache_peer config crock2022 Linux - Networking 0 03-24-2004 05:44 AM

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

All times are GMT -5. The time now is 01:19 AM.

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