Re: [squid-users] squid proxy - multiple outgoing IP addresses

From: Cameron Knowlton <cameron_at_igods.com>
Date: Wed, 18 Nov 2009 11:45:33 -0800

Looks like I spoke too soon... when tracing my nice new proxy on 24.69.177.112, it seems that it's actually going through the primary IP after all:

curl --proxy 24.69.177.112:3128 --trace - www.ipaddressworld.com

Your computer's IP address is:
24.69.160.243

Anyway, I changed to the previous method I was using, and it seems to report correctly:

acl ip1 myip 24.69.160.243
acl ip2 myip 24.69.177.112
tcp_outgoing_address 24.69.160.243 ip1
tcp_outgoing_address 24.69.177.112 ip2

curl --proxy 24.69.177.112:3128 --trace - www.ipaddressworld.com

Your computer's IP address is:
24.69.177.112

Much better. Now, if I could only convince my ISP to give me more than one proxy. Ack! Another barrier!

thanks again, Amos.

Cameron Knowlton

At 10:30 AM -0800 09/11/18, Cameron Knowlton wrote:
>Eureka! Finally found the problem, it was with a different setting within Squid (SquidMan, actually)... I've posted my squid.conf below in its entirety in hopes that it might help others.

and, now the promised and updated squid.conf (I'm so excited, I forgot to include it):

# ----------------------------------------------------------------------
# WARNING - do not edit this template unless you know what you are doing
# ----------------------------------------------------------------------

cache_peer %PARENTPROXY% parent %PARENTPORT% 7 no-query no-digest no-netdb-exchange default
cache_dir ufs %CACHEDIR% %CACHESIZE% 16 256
maximum_object_size %MAXOBJECTSIZE%
http_port %PORT%
visible_hostname %VISIBLEHOSTNAME%

# http_port 24.69.160.243:3128 name=A
# http_port 24.69.177.112:3128 name=B

# acl fromA myportname A
# tcp_outgoing_address 24.69.160.243 fromA
# tcp_outgoing_address 24.69.160.243 !all

# acl fromB myportname B
# tcp_outgoing_address 24.69.177.112 fromB
# tcp_outgoing_address 24.69.177.112 !all

acl ip1 myip 24.69.160.243
acl ip2 myip 24.69.177.112
tcp_outgoing_address 24.69.160.243 ip1
tcp_outgoing_address 24.69.177.112 ip2

cache_access_log %ACCESSLOG%
cache_log %CACHELOG%
cache_store_log %STORELOG%
pid_filename %PIDFILE%

hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin
no_cache deny QUERY

# access control lists
%ALLOWEDHOSTS%
%DIRECTHOSTS%
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 563 8443
acl Safe_ports port 80 81 21 443 563 70 210 1025-65535 280 488 591 777
acl CONNECT method CONNECT

# only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager

# deny requests to unknown ports
http_access deny !Safe_ports

# deny CONNECT to other than SSL ports
http_access deny CONNECT !SSL_ports

# client access
http_access allow localhost
%HTTPACCESSALLOWED%
http_access deny all

# direct access (bypassing parent proxy)
%ALWAYSDIRECT%
always_direct deny all
Received on Wed Nov 18 2009 - 19:47:23 MST

This archive was generated by hypermail 2.2.0 : Thu Nov 19 2009 - 12:00:04 MST