Dear ubuntu-er
saya punya aturan squid (2.7), yang membatasi dwonload dari drop box
saya pakai limit.sh (script 1) yang isinya
#!/bin/sh
cp /etc/squid/squid.conf.lim.txt /etc/squid/squid.conf
squid -k reconfigure
exit 0
ketika di batasi, misal speed download hanya 3kB/s, aturan ini
dijalankan oleh browser
lalu dicoba untuk unlimit batas download dengan run script 2 (unlimit.sh)
#!/bin/sh
cp /etc/squid/squid.conf.unlim.txt /etc/squid/squid.conf
squid -k reconfigure
exit 0
berhasil lagi
tetapi, ketika script 1 di apply lagi, speed download masih besar.
tidak nurut ke aturan. kenapa ya? (dropbox di state di __slow.txt")
please share ilmunya... (squid.conf ada di paling bawah)
regards
#start
acl all src
0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src
127.0.0.1/32
acl to_localhost dst
127.0.0.0/8 0.0.0.0/32
dns_nameservers 203.130.196.5 202.134.0.155
acl SSL_ports port 443
acl SSL_ports port 563
acl SSL_ports port 873
acl Safe_ports port 80
acl Safe_ports port 21
acl Safe_ports port 443
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025-65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl Safe_ports port 631
acl Safe_ports port 873
acl Safe_ports port 901
acl purge method PURGE
acl CONNECT method CONNECT
http_port 8080
hierarchy_stoplist cgi-bin ?
cache_dir ufs /var/spool/squid 1000 16 256
access_log /var/log/squid/access.log squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern (Release|Packages(.gz)*)$ 0 20% 2880
refresh_pattern . 0 20% 4320
acl shoutcast rep_header X-HTTP09-First-Line ^ICY.[0-9]
upgrade_http0.9 deny shoutcast
acl apache rep_header Server ^Apache
# ----------------------- new acl src -----------------------
# acl dingdong src 192.168.2.1-192.168.2.254
acl dingdong src 192.168.34.1-192.168.34.4 192.168.34.6-192.168.34.250
192.168.35.1-192.168.35.250 192.168.36.1-192.168.36.250
icp_access allow dingdong
icp_access deny all
#
# deny
#
#----url_regex---------------
acl __weburl_regex url_regex -i "/etc/squid/acl/__ban_regex.txt"
deny_info
https://www.google.com/not_found __weburl_regex # download
zip rar 15kbps
#----dstdomain---------------
acl __webdomain dstdomain "/etc/squid/acl/__ban_domain.txt"
deny_info
https://www.google.com/not_found __webdomain
#----destdom_regex---------------
acl __webdomain_regex dstdom_regex -i "/etc/squid/acl/__ban_regex.txt"
deny_info
https://www.google.com/not_found __webdomain_regex
#----dest---------------
acl __destination_IP dst "/etc/squid/acl/__ban_IP_tujuan.txt"
deny_info
https://www.google.com/not_found __destination_IP
#----urlpath_regex---------------
acl __urlpath_regex urlpath_regex -i "/etc/squid/acl/__ban_regex.txt"
deny_info
https://www.google.com/not_found __urlpath_regex
#----time---------------
acl __time-8-11 time "/etc/squid/acl/__time1.txt"
#----time---------------
acl __time-13-16 time "/etc/squid/acl/__time2.txt"
#
# allow
#
#----urlpath_regex---------_-----
acl __youtube urlpath_regex -i videoplayback
acl __multimedia urlpath_regex -i \.mpg$ \.mpeg$ \.mp3$ \.m4v$ \.mov$
\.avi$ \.wmv$ \.wma$ \.mp4$ # file movie
acl __pdfxlsdocppt urlpath_regex -i \.pdf$ \.xls$ \.xlsx$ \.doc$
\.docx$ \.pptx$ \.ppt$ # download dokumen
acl __exe urlpath_regex -i \.exe$ \.msi$ # download exe
acl __zip urlpath_regex -i \.zip$ \.rar$
#----dstdomain---------_-----
acl __batasi_fb_dkk dstdomain "/etc/squid/acl/__batasi_fb_dkk.txt"
#----slow---------------
acl __slow dstdomain "/etc/squid/acl/__slow.txt"
#----superslow---------------
acl __superslow dstdomain "/etc/squid/acl/__superslow.txt"
#--------http_access default-----------
http_access allow manager localhost
http_access allow manager
http_access allow purge localhost
http_access deny purge
http_access allow !Safe_ports
http_access allow CONNECT !SSL_ports
http_access allow localhost
#--------http_access
#deny
http_access deny __urlpath_regex
http_access deny __weburl_regex
http_access deny __webdomain
http_access deny __webdomain_regex
http_access deny __destination_IP
http_access allow __youtube
#allow
http_access allow __multimedia
http_access allow __pdfxlsdocppt
http_access allow __exe
http_access allow __zip
http_access allow __slow
http_access allow __superslow
http_access allow dingdong
http_access allow all
#-------------------
broken_vary_encoding allow apache
extension_methods REPORT MERGE MKACTIVITY CHECKOUT
#--------delay pool-----------
delay_pools 8
#--------delay class-----------
delay_class 1 2
delay_class 2 2
delay_class 3 2
delay_class 4 2
delay_class 5 2
delay_class 6 2
delay_class 7 2
delay_class 8 2
#--------delay access-----------
delay_parameters 1 -1/-1 7000/7000
delay_parameters 2 -1/-1 10000/10000
delay_parameters 3 -1/-1 2000/2000
delay_parameters 4 -1/-1 10000/10000
delay_parameters 5 -1/-1 6000/6000
delay_parameters 6 -1/-1 2000/2000
delay_parameters 7 -1/-1 1000/1000
delay_parameters 8 -1/-1 -1/-1 # dingdong
delay_access 1 allow __multimedia
delay_access 1 deny dingdong
delay_access 2 allow __pdfxlsdocppt
delay_access 2 deny dingdong
delay_access 3 allow __exe
delay_access 3 deny dingdong
delay_access 4 allow __zip
delay_access 4 deny dingdong
delay_access 5 allow __youtube
delay_access 5 deny dingdong
delay_access 6 allow __slow
delay_access 6 deny dingdong
delay_access 7 allow __superslow
delay_access 7 deny dingdong
delay_access 8 allow dingdong
hosts_file /etc/hosts
coredump_dir /var/spool/squid