[squid-users] limit bandwidth

Amos Jeffries squid3 at treenet.co.nz
Wed Sep 2 15:23:29 UTC 2020


On 1/09/20 7:50 pm, Majed Zouhairy wrote:
> On Tue, 2020-09-01 at 05:10 +1200, Amos Jeffries wrote:
>> On 31/08/20 8:24 pm, Vacheslav wrote:
>>> Peace,
>>>
>>> been suffering for many hours so i'd rather ask for aid..
>>>
>>> i'm trying to limit the flow mainly for the most maximize people
>>>
>>
>> Okay.
>>
>> What Squid version are you using?
>>
>>
> sudo squid -v
> Squid Cache: Version 4.13
> Service Name: squid
> 
>>> acl slower src 10.46.0.74 10.46.0.107
>>
>> One of the reasons this posting git held up for moderation was that
>> the
>> lines which are supposed to contain ASCII tab characters contained
>> Unicode characters "\c3\82".
> this is now another email client..so let's confirm that
>>
>> If those Unicode characters are actually present in your squid.conf
>> file
>> then you need to go through and remove them all.
> 
> i went ahead and typed those added lines in nano and deleted the
> original ones..still not a trump!
>>
>> ...
>>> acl localnet src 10.46.0.0/24		#  local private
>>> network (LAN)
>>
>> ...
>>> acl blockfiles urlpath_regex -i "/etc/squid/blocks.files.acl"
>>>
>> ...
>>
>>> error_directory /usr/share/squid/errors/en
>>
>> The above is a default value. Remove that line from your config.
> this? error_directory /usr/share/squid/errors/en

Yes, that one.

>>
>>> delay_pools 1
>>> delay_class 1 3
>>> delay_access 1 allow slower !localnet
>>
>> All IPs which match "slower" ACL are also matched by "localnet" ACL.
>>
>> It is impossible for an IP to be both part of slower and not part of
>> localnet. So this line never matches and all traffic is not-delayed.
>>
>> To fix, remove the "!localnet" requirement from the above line.
> i already tried that, i was thinking that there would be an option like
> acl slower src 10.46.0.74 10.46.0.107
> acl localnet src !10.46.0.74 10.46.0.0/24
> so as not type the whole subnet individual addresses
> 

It is possible to define an ACL like localnet with holes. But that would
not do what you are wanting.


"delay_access 1 allow slower"  does what you are asking for in terms of
only the IPs listed in "slower" having their traffic slowed down.

If that is not working, then you may be hitting a bug or something is
different from what you have told us about the traffic. eg CONNECT
tunnels do not always have delay pools applied in Squid-4.


Amos


More information about the squid-users mailing list