ini contoh squid di server milik saya
sori berantakan
tolong revisinya yaa
=====
http_port 3128 transparent
#icp_port 0
#icp_query_timeout 0
#maximum_icp_query_timeout 2000
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
cache_mem 1024 MB
cache_swap_low 94
cache_swap_high 96
maximum_object_size 16384 KB
#minimum_object_size 0 KB
#cache directories
cache_dir ufs /var/spool/squid 50000 9 256
access_log /var/log/squid/access.log squid
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
emulate_httpd_log off
log_ip_on_direct on
client_netmask 255.255.255.255
# OPTIONS FOR TUNING THE CACHE
#wais_relay_port 0
request_header_max_size 20 KB
request_body_max_size 0 KB
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
# TAG: refresh_patterns
refresh_pattern -i .(class|css|js|gif|jpg)$ 10080 100% 43200 override-expire
refresh_pattern -i .(jpe|jpeg|png|bmp|tif)$ 10080 100% 43200 override-expire
refresh_pattern -i .(tiff|mov|avi|qt|mpeg)$ 10080 100% 43200 override-expire
refresh_pattern -i .(mpg|mpe|wav|au|mid)$ 10080 100% 43200 override-expire
refresh_pattern -i .(zip|gz|arj|lha|lzh)$ 10080 100% 43200 override-expire
refresh_pattern -i .(rar|tgz|tar|exe|bin)$ 10080 100% 43200 override-expire
refresh_pattern -i .(hqx|pdf|rtf|doc|swf)$ 10080 100% 43200 override-expire
refresh_pattern -i .(inc|cab|ad|txt|dll)$ 10080 100% 43200 override-expire
refresh_pattern -i .(asp|acgi|pl|shtml|php3|php)$ 2 20% 4320 reload-into-ims
#refresh_pattern -i ? 2 20% 4320 reload-into-ims
refresh_pattern -i cgi-bin 2 20% 4320 reload-into-ims
refresh_pattern . 960 90% 43200 reload-into-ims
refresh_pattern -i .google.co.id$ 1440 100% 3500 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i .detik.com$ 1440 100% 3500 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i .facebook.com$ 1440 100% 3500 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i .google.com$ 1440 100% 3500 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i .mail.google$ 1440 100% 3500 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i .co.id$ 1440 100% 3500 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i .go.id$ 1440 100% 3500 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i .sampang.go.id$ 1440 100% 3500 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i .sampangkag.go.id$ 1440 100% 3500 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i .yahoo.com$ 1440 100% 3500 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i .co.id$ 1440 100% 3500 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i .youtube.com$ 1440 100% 3500 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i .mail.yahoo$ 1440 100% 3500 override-expire override-lastmod reload-into-ims ignore-reload
# ACCESS CONTROLS
acl all src 0.0.0.0/0.0.0.0
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
# variavel localnet… seluruh jaringan 1.0 ke sbawah menggunakan proxi ini
acl localnet src 192.168.10.2-5/255.255.255.255
acl porn url_regex "/etc/squid/acl/porn.txt"
acl noporn url_regex "/etc/squid/acl/noporn.txt"
acl keywordblok url_regex -i "/etc/squid/acl/porn.txt"
acl ip-porn dst "/etc/squid/acl/ip-porn.txt"
#Acl waktuKerja time SMTWHF 08:00-13:00
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # 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 CONNECT method CONNECT
# Allowing or Denying access based on defined access lists
http_access allow manager localhost
http_access allow noporn all
http_access deny porn all
http_access deny ip-porn all
http_access deny keywordblok all
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny to_localhost
#http_access deny bad
# mengizinkan variabel localnet di atas
http_access allow localnet
http_access allow localhost
http_access deny all
http_reply_access allow all
#mencoba tanpa set proxy di user
#http_access_host virtual
#http_access_port 80
#http_access_with_Proxy on
#http_access_uses_host_header on
#icp_access allow all
# ADMINISTRATIVE PARAMETERS
cache_mgr muammalhamidy@gmail.com
visible_hostname ubuntu.com
#Delay Pools
acl local url_regex -i 192.168
acl downloadFile url_regex -i \.exe$
acl downloadFile url_regex -i \.mp3$
acl downloadFile url_regex -i \.3gp$
acl downloadFile url_regex -i \.vqf$
acl downloadFile url_regex -i \.gz$
acl downloadFile url_regex -i \.rpm$
acl downloadFile url_regex -i \.zip$
acl downloadFile url_regex -i \.rar$
acl downloadFile url_regex -i \.avi$
acl downloadFile url_regex -i \.mpeg$
acl downloadFile url_regex -i \.mpe$
acl downloadFile url_regex -i \.mpq$
acl downloadFile url_regex -i \.qt$
acl downloadFile url_regex -i \.ram$
acl downloadFile url_regex -i \.iso$
acl downloadFile url_regex -i \.raw$
acl downloadFile url_regex -i \.wav$
delay_pools 2
#Pools untuk binabangsa
delay_class 1 2
delay_parameters 1 -1/-1 8000/8000
delay_access 1 allow local
delay_access 1 deny all
#pools untuk type file download
delay_class 2 3
delay_parameters 2 32000/32000 1500/1500 250/250
delay_access 2 allow downloadFile
delay_access 2 deny all
=====
terima kasih kepada pihak yang telah membantu saya
terutama kang iriyan gunawan ( http://yan.irvanet.web.id/membuat-squid-agresif )
Jumat, 04 September 2009
Langgan:
Poskan Komentar (Atom)
0 komentar:
Poskan Komentar