We help IT Professionals succeed at work.

cascading sites using squid to an external proxy

adaheem
adaheem asked
on
Medium Priority
791 Views
Last Modified: 2012-05-06
Hi
i want squid to cascde sites like youtube.com , vimeo.com , metacafe.com to an external proxy server.
also with some extensions like .exe , .mp3 , .avi . to the same proxy which is: 192.144.44.19:909

any help please.
10x in advanced
Comment
Watch Question

Maciej Ssysadmin
CERTIFIED EXPERT

Commented:

Author

Commented:
Hi
 
can i have an example for my given please?
 
10x in advanced
Maciej Ssysadmin
CERTIFIED EXPERT

Commented:
Sure :)
Put into your squid.conf:
acl OtherProxy url_regex -i /etc/other_proxy_regex
cache_peer 192.144.44.19 901 parent 901 0
cache_peer_access 192.144.44.19 allow OtherProxy
cache_peer_access 192.144.44.19 deny all

Create also /etc/other_proxy_regex file, which should contain:
youtube\.com
vimeo\.com
metacafe\.com
\.exe$
\.mp3$
\.avi$

Every address or file extension should be on separate line.

Then, restart your squid (or run squid -k reconfigure).

Author

Commented:
Hi
i pasted it in squid.conf in the first lines.
 

acl OtherProxy url_regex -i /etc/other_proxy_regex
cache_peer 192.144.44.19 parent 909 0
cache_peer_access 192.144.44.19 allow OtherProxy
cache_peer_access 192.144.44.19 deny all
 
and created a file called  : "other_proxy_regex" in /etc
and also pasted all the lines you've mentioned .
 
but nothing taken from proxy 192.144.44.19:909
 
any other help please.

Author

Commented:
hi
i used this configuration , it works only when i restart squid , but when i open IE again it doesn't take it from the out box proxy . it takes it from my local connection.
only the page opens from the 2nd proxy but not the video of youtube
Here is my confiuration:

acl youtube dstdomain .youtube.com
cache_peer 192.144.44.19 parent 909 3130
cache_peer_access 192.144.44.19 allow youtube
prefer_direct off
Thanks and waiting for your reply
Maciej Ssysadmin
CERTIFIED EXPERT

Commented:
My mistake - path to file should be surrounded with "".
So, change this:
acl OtherProxy url_regex -i /etc/other_proxy_regex
to this:
acl OtherProxy url_regex -i "/etc/other_proxy_regex"

Author

Commented:
Hi
 
thanks it worked but it is missing something. when i open youtube.com at IE, it starts to take it from the proxy i mentioned, very good. but when i want to click at anything else in the page , it takes it from the main connection and not from the proxy i wanted to redirect the request to.
so i need the sites in the urls to be FORCED to take from the proxy only .
 if the proxy is unavailable, i want the sites in the urls file to give "Page cannot be displayed" not to search for another sources of connection.
 
10x in advanced
sysadmin
CERTIFIED EXPERT
Commented:
I tried to reproduce your squid's behavior, but I'm unable to do this.
In my configuration (which is almost default one + above rules) webpages I list in file are taken from that second cache server only. I simulated situation when this proxy is unreachable by dropping packets on firewall. According to your last post, this should mean, that I should get this webpage directly, right? I got "timeout" error message from my local proxy server (so - everything as it should be).

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
good , it was a mistake i've made
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.