If we want to limit the client in downloading the files with the extension
particular, the use squid delay pools.
How, from the server ClearOS press Alt + F2, enter user = root pwd = your root password,
we do edit via the CLI (Command Line Interface)
code
#vi /etc/squid/squid.conf
press insert
enter the following syntax:
code:
acl lokal src 192.168.1.0/24
acl ekstensiblok url_regex -i \.wmv \.mpg \.mpeg \.wma \.wav
\.3gp \.3gpp \.avi \.dat \.aac \.ogg \.mp4 \.mp3 \.mov \.rar
\.zip \.7z \.iso \.ace \.exe \.torrent \.mkv \.flv \.rm \.asf
delay_pools 1
delay_class 1 1
delay_parameters 1 15000/1000000
delay_access 1 allow ekstensiblok lokal
delay_access 1 deny ALL
Description:
- src is local ip address your clients, adjust themselves in the sample mean-192.168.1.1
192.168.1.254
- download the file extension you want on the block like the example above, you can reduce or
add their own
- 15000/1000000 delay parameter means that if the file is downloaded already exceed 1MB
then the download speed will drop to 15Kbyte/s.Sesuaikan own parameters according to
you.
Example: if I want to download files. mp3 the magnitude 4MB, then the first time
download will get the maximum bandwidth available, so it reaches 1MB
bandwidth will go down until rata2 15KBps aja until the download is complete.
When finished editing press the Esc
then save with: wq [enter]
restart squid
Code:
# service squid restart
No comments:
Post a Comment