Quantcast

Configure squid 3.5 to use different parent proxies for different listening ports

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Configure squid 3.5 to use different parent proxies for different listening ports

Damir Bagapov
Hi,

I have following configuration:

# Squid normally listens to port 3128
http_port 3128

cache_peer proxy1_address parent proxy1_port 0 proxy-only default login=name1:pass1
never_direct allow all

And I need to configure squid in a way when all incoming requests to 3128 port will be redirected to proxy1 (as it works now), and all incoming requests to 3127 will be redirected to proxy2. Is it possible to do?


http_port 3128
http_port 3127

acl port_3128 port 3128
acl port_3127 port 3127

# 3128
cache_peer proxy01 parent 3128 0 no-query originserver name=proxy3128
cache_peer_access proxy3128 allow port_3128
cache_peer_access proxy3128 deny port_3127

# 3127 
cache_peer proxy02 parent 3128 0 no-query originserver name=proxy3127
cache_peer_access proxy3127 allow port_3127
cache_peer_access proxy3127 deny port_3128

But its not working =(

--
Best regards,
Damir

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Configure squid 3.5 to use different parent proxies for different listening ports

Eliezer Croitoru
You can try  the next:
http_port 3128 name=one
http_port 3127 name=two

acl port_3128 myportname one
acl port_3127 myportname two

always_direct deny port_3128
always_direct deny port_3127

never_direct allow port_3128
never_direct allow port_3127

# 3128
cache_peer proxy01 parent 3128 0 no-query originserver name=proxy3128
cache_peer_access proxy3128 allow port_3128
cache_peer_access proxy3128 deny all

# 3127
cache_peer proxy02 parent 3128 0 no-query originserver name=proxy3127
cache_peer_access proxy3127 allow port_3127
cache_peer_access proxy3127 deny all
##END

And see if it helps with something.

Eliezer

----
http://ngtech.co.il/lmgtfy/
Linux System Administrator
Mobile: +972-5-28704261
Email: [hidden email]


From: squid-users [mailto:[hidden email]] On Behalf Of Damir Bagapov
Sent: Monday, February 20, 2017 11:06 PM
To: [hidden email]
Subject: [squid-users] Configure squid 3.5 to use different parent proxies for different listening ports

Hi,

I have following configuration:

# Squid normally listens to port 3128
http_port 3128

cache_peer proxy1_address parent proxy1_port 0 proxy-only default login=name1:pass1
never_direct allow all

And I need to configure squid in a way when all incoming requests to 3128 port will be redirected to proxy1 (as it works now), and all incoming requests to 3127 will be redirected to proxy2. Is it possible to do?

I've tried to use ACL described here http://wiki.squid-cache.org/ConfigExamples/Reverse/MultipleWebservers#Other_Criteria_than_Domain

http_port 3128
http_port 3127

acl port_3128 port 3128
acl port_3127 port 3127

# 3128
cache_peer proxy01 parent 3128 0 no-query originserver name=proxy3128
cache_peer_access proxy3128 allow port_3128
cache_peer_access proxy3128 deny port_3127

# 3127
cache_peer proxy02 parent 3128 0 no-query originserver name=proxy3127
cache_peer_access proxy3127 allow port_3127
cache_peer_access proxy3127 deny port_3128

But its not working =(

--
Best regards,
Damir

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Configure squid 3.5 to use different parent proxies for different listening ports

Eliezer Croitoru
And forgot to add also:
nonhierarchical_direct off

----
Eliezer Croitoru
Linux System Administrator
Mobile: +972-5-28704261
Email: [hidden email]


-----Original Message-----
From: squid-users [mailto:[hidden email]] On Behalf Of Eliezer Croitoru
Sent: Monday, February 20, 2017 11:20 PM
To: 'Damir Bagapov' <[hidden email]>; [hidden email]
Subject: Re: [squid-users] Configure squid 3.5 to use different parent proxies for different listening ports

You can try  the next:
http_port 3128 name=one
http_port 3127 name=two

acl port_3128 myportname one
acl port_3127 myportname two

always_direct deny port_3128
always_direct deny port_3127

never_direct allow port_3128
never_direct allow port_3127

# 3128
cache_peer proxy01 parent 3128 0 no-query originserver name=proxy3128
cache_peer_access proxy3128 allow port_3128
cache_peer_access proxy3128 deny all

# 3127
cache_peer proxy02 parent 3128 0 no-query originserver name=proxy3127
cache_peer_access proxy3127 allow port_3127
cache_peer_access proxy3127 deny all
##END

And see if it helps with something.

Eliezer

----
http://ngtech.co.il/lmgtfy/
Linux System Administrator
Mobile: +972-5-28704261
Email: [hidden email]


From: squid-users [mailto:[hidden email]] On Behalf Of Damir Bagapov
Sent: Monday, February 20, 2017 11:06 PM
To: [hidden email]
Subject: [squid-users] Configure squid 3.5 to use different parent proxies for different listening ports

Hi,

I have following configuration:

# Squid normally listens to port 3128
http_port 3128

cache_peer proxy1_address parent proxy1_port 0 proxy-only default login=name1:pass1
never_direct allow all

And I need to configure squid in a way when all incoming requests to 3128 port will be redirected to proxy1 (as it works now), and all incoming requests to 3127 will be redirected to proxy2. Is it possible to do?

I've tried to use ACL described here http://wiki.squid-cache.org/ConfigExamples/Reverse/MultipleWebservers#Other_Criteria_than_Domain

http_port 3128
http_port 3127

acl port_3128 port 3128
acl port_3127 port 3127

# 3128
cache_peer proxy01 parent 3128 0 no-query originserver name=proxy3128
cache_peer_access proxy3128 allow port_3128
cache_peer_access proxy3128 deny port_3127

# 3127
cache_peer proxy02 parent 3128 0 no-query originserver name=proxy3127
cache_peer_access proxy3127 allow port_3127
cache_peer_access proxy3127 deny port_3128

But its not working =(

--
Best regards,
Damir

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Loading...