Linux - Server This forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
10-07-2009, 11:55 PM
#1
LQ Newbie
Registered: Jan 2004
Posts: 8
Thanked: 0
Squid cache_peer interesting issue
[
Log in to
get rid of this advertisement]
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
10-08-2009, 11:35 AM
#2
Member
Registered: Jan 2005
Location: Shropshire, England, UK
Distribution: RedHat, Fedora, CentOS..........
Posts: 90
Thanked: 4
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.
10-08-2009, 08:38 PM
#3
LQ Newbie
Registered: Jan 2004
Posts: 8
Thanked: 0
Original Poster
cache_peer
that indeed would be a much neater way of doing things
thanks :-)
but it has the same result
10-09-2009, 05:11 AM
#4
Member
Registered: Jan 2005
Location: Shropshire, England, UK
Distribution: RedHat, Fedora, CentOS..........
Posts: 90
Thanked: 4
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 ?
10-11-2009, 07:56 PM
#5
LQ Newbie
Registered: Jan 2004
Posts: 8
Thanked: 0
Original Poster
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 ;-)
10-12-2009, 07:14 AM
#6
Member
Registered: Jan 2005
Location: Shropshire, England, UK
Distribution: RedHat, Fedora, CentOS..........
Posts: 90
Thanked: 4
I'm glad you got it working. What was the default parent option that was missing off proxy 1 ?
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT -5. The time now is 05:28 AM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News
LQ Podcast
LQ Radio