Squid Proxy

#/etc/squid/squid.conf

http_port 3128 transparent
icp_port 3130
prefer_direct off

cache_mem 256 MB
cache_swap_low 98
cache_swap_high 99
max_filedescriptors 8192
maximum_object_size 1024 MB
minimum_object_size 0 KB
maximum_object_size_in_memory 128 KB

offline_mode off

ipcache_size 4096
ipcache_low 98
ipcache_high 99
fqdncache_size 4096

cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF
server_http11 on

cache_dir ufs /proxy/proxy1 9000 32 128
cache_dir ufs /proxy/proxy2 9000 32 128
cache_dir ufs /proxy/proxy3 9000 32 128

cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
pid_filename /var/run/squid.pid
cache_swap_log /var/log/squid/swap.state

dns_nameservers /etc/resolv.conf

emulate_httpd_log off
hosts_file /etc/hosts
half_closed_clients off
negative_ttl 1 minutes

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
acl SSL_ports port 443 563 873 # https snews rsync
acl Safe_ports port 80 # http
acl Safe_ports port 20 21 # ftp
acl Safe_ports port 22  # ssh
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 631 # cups
acl Safe_ports port 10000 # webmin
acl Safe_ports port 901 # SWAT
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 873 # rsync
acl Safe_ports port 110 # POP3
acl Safe_ports port 25 # SMTP
acl Safe_ports port 2095 2096 # webmail from cpanel
acl Safe_ports port 2082 2083 # cpanel
acl purge method PURGE
acl CONNECT method CONNECT

http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports !SSL_ports
http_access deny CONNECT !SSL_ports !Safe_ports

refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i .(gif|png|jpg|jpeg|ico|bmp|tif)$ 10080 90% 43200 override-expire ignore-no-cache ignore-private
refresh_pattern -i .(deb|rpm|exe|ram|bin|pdf|ppt|doc|tiff)$ 10080 90% 43200 override-expire ignore-reload ignore-private
refresh_pattern -i .(iso|avi|wav|mp3|mp4|mpeg|mpg|swf|mov|qt|divx|rm|rmvb|3gp)$ 43200 90% 432000 override-expire ignore-no-cache ignore-private
refresh_pattern -i .(zip|gz|arj|lha|lzh|tar|tgz|cab|rar|7z)$ 10080 95% 43200 override-expire ignore-reload ignore-private
refresh_pattern -i .(html|htm|css|js|php|asp|aspx|cgi|pl|php3|shtml) 1440 90% 40320
refresh_pattern -i (/cgi-bin/|?) 0 0% 0
refresh_pattern -i .(flv|x-flv)$ 10080 90% 999999 ignore-no-cache override-expire ignore-private
refresh_pattern -i .mail.yahoo$ 1440 100% 3500 override-expire override-lastmod
refresh_pattern (get_video?|videoplayback?|videodownload?) 5259487 99999999% 5259487 override-expire ignore-reload negative-ttl=0
refresh_pattern . 0 20% 4320

snmp_port 3401
acl snmpsquid snmp_community public
snmp_access allow snmpsquid localhost
snmp_access deny all

acl ubuntu src 192.168.0.0/16
http_access allow ubuntu
http_access allow localhost
http_access deny all
http_reply_access allow all
icp_access allow ubuntu
icp_access allow localhost
icp_access deny all
always_direct deny all

cache_mgr warnet
cachemgr_passwd none
visible_hostname warnetnux
cache_effective_user proxy 
cache_effective_group proxy
coredump_dir /var/spool/squid
shutdown_lifetime 10 seconds
logfile_rotate 1

#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 .divx .rm .rmvb .3gp .pdf .doc
#acl youtube url_regex -i .youtube.com
#delay_pools 1
#delay_class 1 1
#delay_parameters 1 50000/50000
#delay_access 1 allow ekstensiblok youtube
#delay_access 1 deny ALL

0 komentar "Squid Proxy", Baca atau Masukkan Komentar

Post a Comment