[squid-dev] squid to assign dedicated ip to clients behind same network/router

Amos Jeffries squid3 at treenet.co.nz
Mon Jun 18 04:57:43 UTC 2018


[ this dev list is not appropriate for proxy usage questions. Please
address questions and requests for help using Squid to the squid-users
mailign list. ]


On 12/06/18 07:48, desis wrote:
> 
> I have successfully installed squid server (On Centos) .. My servers has

Which version of Squid on what version of CentOS.

Squid versions older than the 3.5 series are not supported by us. AFAIK
the problem you describe does not happen with a correctly configured
Squid-3.5.


> five ip addresses . I have configured all 5 ip addresses for squid... so
> clients can connect with any ip address and with tcp_outgoing_address client
> will get same ip address from which ip address he is connecting.
> 
> But the problem is all my clients are behind a same router and having the
> same public ip address.

The joys of NAT and IPv4-only networks.

The only real solution to that is to upgrade your network such that it
does not NAT clients into the same IP address. You may require IPv6 to
achieve that.


> 
> Now the problem is .. Let see client one use server 1.1.1.0 ip address to
> connect squid first, he is getting server 1.1.1.0 ip address for his public
> ip.
> 
> Now Client two using server 2.2.2.0 ip address to connect squid , he is
> getting server 2.2.2.0 ip adddress for his public ip ...
> 
> But at this moment client's one public ip address is changing to 2.2.2.0 .

There is nothing Squid can do about a *client* IP address. All it can do
it *request* the OS to use certain outgoing IP on its own connections.


Going forward you need to be aware that HTTP is a multiplexing protocol.
Any connection between proxy and a server can be used by any client who
needs content from that server.

This is how HTTP is designed to work. To multiplex connections and
maximize pipeline efficiencies, in order to reduce the pressures of port
number consumption. Without it proxies can flood the network with
short-lived TCP connections and consume all available ports on every
machine along the traffic path.


Amos


More information about the squid-dev mailing list