LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Squid cache_peer interesting issue (http://www.linuxquestions.org/questions/linux-server-73/squid-cache_peer-interesting-issue-760447/)

canzi 10-07-2009 10:55 PM

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

cardy 10-08-2009 10:35 AM

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.

canzi 10-08-2009 07:38 PM

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

but it has the same result

cardy 10-09-2009 04:11 AM

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 ?

canzi 10-11-2009 06:56 PM

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 ;-)

cardy 10-12-2009 06:14 AM

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


All times are GMT -5. The time now is 02:22 AM.