Multple IP routing on Squid Proxy

PROXYsquid

I have installed Squid Proxy on a server which has 4 IP addresses.eg

  • 192.123.0.10
  • 192.123.0.11
  • 192.123.0.12
  • 192.123.0.13

192.123.0.10 is the main IP. I want to be able to either:

Set my browser proxy to point to 1 of the four ip's listed and have squid use that correspondining IP as it's outgoing ip address

OR

Set my browser proxy to point to 1 of the four ip's listed and have squid randonmly choose from the outgoing ip from the list

Any ideas?


EDIT for clarification:

As an example. Lets say I set my browser to point to 192.123.0.10, any website I visit should see my IP address as 192.123.0.10. This works. Then if I change my browser to point to 192.123.0.11, any website I visit should see my IP address as 192.123.0.11, but instead it sees the first IP 192.123.0.10. The same goes for 192.123.0.12 and 192.123.0.13.

Best Answer

Found a way of doing it. In the squid config I setup 4 http_port values with an acl for each port:

acl portA myport 8080
acl portB myport 8081
acl portC myport 8082
acl portD myport 8083
http_port 8080
http_port 8081
http_port 8082
http_port 8083

and then I redirect the outgoing ip address according to the port it came in on:

tcp_outgoing_address 192.123.0.10 portA
tcp_outgoing_address 192.123.0.11 portB
tcp_outgoing_address 192.123.0.12 portC
tcp_outgoing_address 192.123.0.13 portD

Then before I make a request to a certian web page I change the port in the browser proxy settings and the the IP address they see changes.

Only issue is that it seems to have a cache on it. I need to wait a few minutes after I change the proxy port before it reflects the new ip address.

Related Topic