LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 02-15-2013, 04:49 AM   #1
pestka
Member
 
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).

Code:
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;
Code:
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, 05:53 AM   #2
pestka
Member
 
Registered: Dec 2012
Location: Southampton, UK
Posts: 36

Original Poster
Rep: Reputation: Disabled
Post

I've figured it out by myself

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

Code:
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.
 
  


Reply

Tags
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 09:52 AM
Postfix - Multiple ports and multiple relayhost saraza Linux - Server 1 10-02-2011 06:11 PM
Multiple minicom sessions w/multiple serial ports?? phody_lee Linux - Server 1 11-15-2010 11:17 AM
Multiple Autologins; Multiple Users; Multiple Sessions mrclisdue Linux - Desktop 1 09-26-2007 05:50 AM
using dd comand to write to multiple destinations dln2k5 Linux - Newbie 1 10-28-2004 05:17 PM


All times are GMT -5. The time now is 12:31 AM.

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