Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 02-15-2013, 05:49 AM   #1
Registered: Dec 2012
Location: Southampton, UK
Posts: 36

Rep: Reputation: Disabled
Post Squid multiple ports multiple destinations

Hello there,

I want to spawn one squid instance on multiple ports (which I already have).

http_port myip:9000 name=first
http_port myip:9001 name=second
http_port myip:9002 name=third
Now what I want to achieve is that when I connect to different ports I will go through different proxies, like this:
- port 9000 I go through proxy0
- port 9001 I go through proxy1
- port 9001 I go through proxy2

This is what's my conf now;
acl exceptions dstdomain "/etc/squid/squid-exception.acl"
always_direct allow exceptions
http_access allow all

cache_peer proxy0 parent port0 0 no-query name=first
cache_peer proxy1 parent port1 0 no-query name=second
cache_peer proxy2 parent port2 0 no-query name=third
but even though I'm connected to my proxy to port1 it does not go through proxy1ort1 bur proxy0ort0 - always.

How to tell squid to use a certain cache_peer based upon which port I am connecting to?
Old 02-15-2013, 06:53 AM   #2
Registered: Dec 2012
Location: Southampton, UK
Posts: 36

Original Poster
Rep: Reputation: Disabled

I've figured it out by myself

For any other people who struggle with that too, here's how to do that:

acl PORTNAME myport 9000
cache_peer MYPROXY parent PORT_OF_PROXY 0 no-query LOGIN PASS
cache_peer_access MYPROXY deny !PORTNAME
where myproxy is the second proxy (and its port further on). Then we deny access to all request EXCEPT OF the port one has specified.


port, proxy, proxypass, squid

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] ssh tunnelling to multiple destinations - how to handle changing server key ? kubuntu-man Linux - Networking 7 09-17-2012 10:52 AM
Postfix - Multiple ports and multiple relayhost saraza Linux - Server 1 10-02-2011 07:11 PM
Multiple minicom sessions w/multiple serial ports?? phody_lee Linux - Server 1 11-15-2010 12:17 PM
Multiple Autologins; Multiple Users; Multiple Sessions mrclisdue Linux - Desktop 1 09-26-2007 06:50 AM
using dd comand to write to multiple destinations dln2k5 Linux - Newbie 1 10-28-2004 06:17 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:29 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration