Friday, February 4, 2011

Setting Sederhana Configurasi Squid Lusca

Setelah beberapa kali mencoba proxy dengan squid, ternyata dari squid sendiri ada developement sendiri dengan nama Lucsa [ http://www.lusca.org/ ]. lumayan sih.. kenceng dan stabil.

ini configurasi yang selama ini saya gunakan.
mungkin bisa di modufy sendiri biar lebih keceng dan stabil..


squid.conf :

http_port 8989 transparent
hierarchy_stoplist cgi-bin ? .js .jsp
acl QUERY urlpath_regex cgi-bin \? .js .jsp
cache deny QUERY

cache_mem 2560 KB
cache_swap_low 98
cache_swap_high 99
ipcache_size 8192
ipcache_low 98
ipcache_high 99

cache_log /dev/null
cache_store_log none

cache_dir aufs /cache3 200000 512 256
coredump_dir /cache3

maximum_object_size 172 MB
maximum_object_size_in_memory 6 KB
minimum_object_size 0 KB

quick_abort_min 0
quick_abort_max 0
quick_abort_pct 100%

negative_ttl 1 minutes
positive_dns_ttl 60 seconds
negative_dns_ttl 30 seconds

acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.0/24

acl office src 192.168.20.0/24

acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl SSL_ports port 443 # https
acl SSL_ports port 563 # snews
acl SSL_ports port 873 # rsync
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 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

http_access allow manager localhost
http_access allow manager

http_access allow purge localhost
http_access deny purge
# Deny requests to unknown ports
http_access deny !Safe_ports
# Deny CONNECT to other than SSL ports
http_access deny CONNECT !SSL_ports

http_access allow office

http_access deny all
http_access allow localnet
#Allow ICP queries from local networks only
icp_access allow localnet
#edited

cache_mgr admin@xxx.co.id

cache_effective_user squid
cache_effective_group squid
visible_hostname squid.xxx.co.id
logfile_rotate 2
memory_pools off
buffered_logs off

log_fqdn off
log_icp_queries off
forwarded_for on
follow_x_forwarded_for allow all
#
prefer_direct off
fqdncache_size 8192
client_db on
netdb_low 900
netdb_high 1000
netdb_ping_period 5 minutes
#
query_icmp off
reload_into_ims on
pipeline_prefetch on
vary_ignore_expire off
ie_refresh on

request_header_max_size 16 KB
store_objects_per_bucket 12
strip_query_terms off

access_log /var/log/squid/access.log squid

refresh_pattern ^ftp: 10080 95% 241920 reload-into-ims
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i \.(class|css|js|gif|jpg)$ 10080 95% 43200 reload-into-ims
refresh_pattern -i \.(jpe|jpeg|png|bmp|tif)$ 10080 95% 43200 reload-into-ims
refresh_pattern -i \.(tiff|mov|avi|qt|mpeg)$ 10080 95% 43200 reload-into-ims
refresh_pattern -i \.(mpg|mpe|wav|au|mid)$ 10080 95% 43200
refresh_pattern -i \.(zip|gz|arj|lha|lzh)$ 10080 95% 43200
refresh_pattern -i \.(rar|tgz|tar|exe|bin)$ 10080 95% 43200
refresh_pattern -i \.(hqx|pdf|rtf|doc|swf)$ 10080 95% 43200
refresh_pattern -i \.(inc|cab|ad|txt|dll)$ 10080 95% 43200
refresh_pattern -i \.(asp|cgi|pl|shtml|php3|php)$ 2 20% 4320 reload-into-ims
refresh_pattern . 360 65% 120960 reload-into-ims

No comments: