I am using squid 3.3.8. I am setting up multiple outgoing IPs based on this post

Proxy Server Multiple IP's

and this one


However, the problem is I have 256 outgoing IPs but squid acts as only first 128 rules were in effect. The configuration is fine because if I comment out first 128 rules then the last 128 ones work correctly. Any ideas?


I think my problem is the same as in this post: https://stackoverflow.com/questions/40102777/squid-max-number-of-ips-limited-to-128


After some research I found out the solution, however it comes with a cost. First thing first yes there is a limit of 128 connections. Let me quote

For each packet read Squid has to check the listening port list to see if it is a read() or accept() operation. Doing even 128 checks per packet is pushing the boundaries for reasonable performance loss.

So that's why the limit is there. If you want to remove it well you can do it by building the latest version of Squid using: ./configure CXXFLAGS="-DMAXTCPLISTENPORTS=XXX" where XXX is your new limit

Answer based on: http://squid-web-proxy-cache.1019090.n4.nabble.com/squid-with-multiple-ips-is-listenting-to-some-ips-with-port-and-not-all-of-ips-td4668784.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.