BolPoint.wordpress.com

April 9, 2010

Membatasi kecepatan download client di SQUID

Filed under: Umum — bolpoint @ 2:28 am
Tags:

untuk konfigurasi squid.conf adalah

#================================================================$
# Proxy Server Versi 2.6.Stable18
#
# Dibuat: Faisal Reza @ Mutiara Access
# Modifikasi: OPiKdesign
#================================================================$
#
http_port 3128 transparent
hierarchy_stoplist cgi-bin ? .js .jsp
acl QUERY urlpath_regex cgi-bin \? .js .jsp
no_cache deny QUERY
cache_mem 32 MB
cache_swap_low 80
cache_swap_high 100
maximum_object_size 30 MB
minimum_object_size 0 KB
ipcache_size 8192
ipcache_low 98
ipcache_high 99
fqdncache_size 8192
cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF
cache_dir aufs /webproxy 2800 32 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log none
pid_filename /var/run/squid.pid
cache_swap_log /var/log/squid/swap.state
emulate_httpd_log on
hosts_file /etc/hosts
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
negative_ttl 2 minutes
half_closed_clients off
#
acl snmpcommunity snmp_community public
acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
#
acl SSL_ports port 443 # snews
acl SSL_ports port 873 # rsync
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 563 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
acl blokir dstdomain .facebook.com .friendster.com .multiply.com .myspace.com .$
#
http_access deny blokir
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
cache_mgr t@mp@n
visible_hostname tojadmin
#
#
#================================================================$
# Pembatasan B/W Download dgn mendeteksi extention file.
#
# jika download lebih dari 5Mbyte kecepatan akan turun 1Kb/s
# jika download lebih dari 2Mbyte kecepatan akan turun 10Kb/s
# jika download lebih dari 1Mbyte kecepatan akan turun 20Kb/s
#
# Dibuat: OPiKdesign
#================================================================$
#
acl download url_regex -i ftp \.exe$ \.mp3$ \.mp4$ \.tar.gz$ \.gz$ \.tar.bz2$ \$
acl download url_regex -i \.avi$ \.mpg$ \.mpeg$ \.rm$ \.iso$ \.wav$ \.mov$ \.da$
acl download url_regex -i \.midi$ \.rmi$ \.wma$ \.wmv$ \.ogg$ \.ogm$ \.m1v$ \.m$
acl download url_regex -i \.m3u$ \.asx$ \.wpl$ \.wmx$ \.dvr-ms$ \.snd$ \.au$ \.$
acl download url_regex -i \.m2p$ \.ts$ \.tp$ \.trp$ \.div$ \.divx$ \.mod$ \.vob$
acl download url_regex -i \.ac3$ \.cda$ \.vro$ \.deb$ \.pdf$ \.com$ \.nrg$ \.vc$
#
delay_pools 1
#
#
delay_class 1 1
delay_parameters 1 20000/1000000 10000/2000000 1000/5000000
delay_access 1 allow download
delay_access 1 deny all

2 Comments »

  1. Terima kasih infonya..
    Ijin share ya..

    Comment by dedy — January 10, 2013 @ 4:06 pm | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: