How do I limit the number of simultaneous web connections from a client system via the Squid proxy server?
maxconn Access Control List (
acl) element it is possible to limit simultaneous web connections coming from client systems that use a Squid proxy server. To use the
maxconn element, the “
client_db on” directive should be set. By default this is activated in the
/etc/squid/squid.conf configuration file.
/etc/squid/squid.conf file and look for the fields listed below to be able put the
maxconn parameters afterwards:
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS # Example rule allowing access from your local networks. Adapt # to list your (internal) IP networks from where browsing should # be allowed #acl our_networks src 192.168.1.0/24 192.168.2.0/24 #http_access allow our_networks
Here is an example of limiting 5 simultaneous web access from the same client system:
acl STUDENTS 192.168.3.0/24 acl numbercon maxconn 5 http_access deny STUDENTS numbercon
Restart the Squid service for the changes to take effect:
service squid restart http://www.redhat.com/magazine/011sep05/departments/tips_tricks/