Re: [squid-users] SQUID - Using random IP's
Vapourmike wrote: Hi, I currently have a server installed and running Squid 2.6 (via Yum), on my box I have a block of 32 IP address's configured for apache, but Squid just uses the main IP address (whatsmyip.com), anyway I would like to set SQUID up so that it cycles through the IP's randomly, so if I go to whatsmyip.com it changes each time I hit refresh (picks one from the list). Is this possible? Ive seen countless proxies do this before, but unsure on how to configure SQUID to do this. Not at present. There is an open request to get a 'random' ACL created for Squid. For now you are stuck with listing the IPs to use individually in tcp_outgoing_addr and creating some other criteria (such as time of day) to select the specific sending IP. Amos -- Please be using Current Stable Squid 2.7.STABLE6 or 3.0.STABLE19 Current Beta Squid 3.1.0.13
Re: [squid-users] SQUID - Using random IP's
using iptables ... use nth module. Johan On Wed, Sep 16, 2009 at 5:29 PM, Amos Jeffries squ...@treenet.co.nz wrote: Vapourmike wrote: Hi, I currently have a server installed and running Squid 2.6 (via Yum), on my box I have a block of 32 IP address's configured for apache, but Squid just uses the main IP address (whatsmyip.com), anyway I would like to set SQUID up so that it cycles through the IP's randomly, so if I go to whatsmyip.com it changes each time I hit refresh (picks one from the list). Is this possible? Ive seen countless proxies do this before, but unsure on how to configure SQUID to do this. Not at present. There is an open request to get a 'random' ACL created for Squid. For now you are stuck with listing the IPs to use individually in tcp_outgoing_addr and creating some other criteria (such as time of day) to select the specific sending IP. Amos -- Please be using Current Stable Squid 2.7.STABLE6 or 3.0.STABLE19 Current Beta Squid 3.1.0.13
Re: [squid-users] SQUID - Using random IP's
Hi, So assuming this then, I could potentially change the IP address on an hourly basis? do you have an example ACL rule I could use that would change the IP based upon time? Im a complete beginner at SQUID and thus I havnt even setup the IP's (if I have to), I literally installed via YUM and changed a few settings (such as forward_for and via). so in short ... Do I need to declare the IP's? and do you have an example ACL? Thanks Mike P.S Thanks for the swift reply, appreciated Amos Jeffries-2 wrote: Vapourmike wrote: Hi, I currently have a server installed and running Squid 2.6 (via Yum), on my box I have a block of 32 IP address's configured for apache, but Squid just uses the main IP address (whatsmyip.com), anyway I would like to set SQUID up so that it cycles through the IP's randomly, so if I go to whatsmyip.com it changes each time I hit refresh (picks one from the list). Is this possible? Ive seen countless proxies do this before, but unsure on how to configure SQUID to do this. Not at present. There is an open request to get a 'random' ACL created for Squid. For now you are stuck with listing the IPs to use individually in tcp_outgoing_addr and creating some other criteria (such as time of day) to select the specific sending IP. Amos -- Please be using Current Stable Squid 2.7.STABLE6 or 3.0.STABLE19 Current Beta Squid 3.1.0.13 -- View this message in context: http://www.nabble.com/SQUID---Using-random-IP%27s-tp25469284p25470136.html Sent from the Squid - Users mailing list archive at Nabble.com.
Re: [squid-users] SQUID - Using random IP's
Vapourmike wrote: Hi, So assuming this then, I could potentially change the IP address on an hourly basis? do you have an example ACL rule I could use that would change the IP based upon time? Im a complete beginner at SQUID and thus I havnt even setup the IP's (if I have to), I literally installed via YUM and changed a few settings (such as forward_for and via). so in short ... Do I need to declare the IP's? and do you have an example ACL? First have a look at the FAQ section on ACLs... http://wiki.squid-cache.org/SquidFaq/SquidAcl ...especially the part dealing with time-based access... http://wiki.squid-cache.org/SquidFaq/SquidAcl#head-ef469ed90b785ebb496c66523bb69030e0b7c906 ...and finally the tcp_outgoing_address directive... http://www.squid-cache.org/Doc/config/tcp_outgoing_address/ Just be aware, even though HTTP is stateless, there are any number of sites and applications that use cookies to track a session and do not play nice when that session changes source IP in the middle of the transaction. You might want to use a combination of dstdom_regex and tcp_outgoing_address (all domains starting with a go through the first IP, all domains starting with b go through the second, etc.), or use a src ACL to send each client out a specific IP. Otherwise, have your clients pick an IP to connect to at random (using a proxy.pac or DNS round robin) and base the tcp_outgoing_address on a myip ACL. Thanks Mike P.S Thanks for the swift reply, appreciated Chris