Kamis, 22 Oktober 2009

My Maestro Squid

Kamis, 22 Oktober 2009
#OPTIONS FOR AUTHENTICATION
auth_param basic children 10
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off

# ACCESS CONTROLS
acl download url_regex -i ftp \.exe$ \.mp3$ \.mp4$ \.tar.gz$ \.gz$ \.tar.bz2$ \.rpm$ \.zip$ \.rar$
acl download url_regex -i \.avi$ \.mpg$ \.mpeg$ \.rm$ \.iso$ \.wav$ \.mov$ \.dat$ \.mpe$ \.mid$
acl download url_regex -i \.midi$ \.rmi$ \.wma$ \.wmv$ \.ogg$ \.ogm$ \.m1v$ \.mp2$ \.mpa$ \.wax$
acl download url_regex -i \.m3u$ \.asx$ \.wpl$ \.wmx$ \.dvr-ms$ \.snd$ \.au$ \.aif$ \.asf$ \.m2v$
acl download url_regex -i \.m2p$ \.ts$ \.tp$ \.trp$ \.div$ \.divx$ \.mod$ \.vob$ \.aob$ \.dts$
acl download url_regex -i \.ac3$ \.cda$ \.vro$ \.deb$

## Recommended minimum configuration
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 # 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
acl myintranet src 192.168.0.0/24
acl admin src 192.168.0.253/255.255.255.255
acl linda src 192.168.0.23/255.255.255.255
acl trisna src 192.168.0.24/255.255.255.255
acl pagi time MTWHF 08:00-15:00
acl sore time MTWHF 15:01-23:30
acl blockeddomain url_regex -i "/etc/squid/domainblock.txt"

http_access allow linda blockeddomain pagi
http_access deny myintranet blockeddomain pagi
http_access allow myintranet
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny all

http_reply_access allow all
icp_access allow all
miss_access allow all

# NETWORK OPTIONS
http_port 8080

# OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM
hierarchy_stoplist cgi-bin ?

# MEMORY CACHE OPTIONS
cache_mem 6 MB
cache_swap_low 98
cache_swap_high 99

maximum_object_size_in_memory 32 KB
maximum_object_size 128 MB

cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF
memory_pools off

cache_dir ufs /var/spool/squid 40000 16 256

# LOGFILE OPTIONS
log_fqdn off
log_icp_queries off
cache_log none
cache_store_log none

## We recommend you to use the following two lines.
acl QUERY urlpath_regex cgi-bin \?

refresh_pattern ^ftp: 10080 95% 241920 reload-into-ims override-lastmod
refresh_pattern . 180 95% 120960 reload-into-ims override-lastmod
reload_into_ims on
pipeline_prefetch on
vary_ignore_expire on
quick_abort_min 0
quick_abort_max 0
quick_abort_pct 98

icp_hit_stale on
query_icmp on
#TIMEOUTS
connect_timeout 1 minutes
read_timeout 15 minutes
request_timeout 5 minutes
persistent_request_timeout 1 minutes
client_lifetime 5 day
pconn_timeout 120 seconds
shutdown_lifetime 10 seconds


# ADMINISTRATIVE PARAMETERS
cache_mgr toil_satanic@yahoo.com
visible_hostname toil_satanic@yahoo.com

# DELAY POOL PARAMETERS
delay_pools 2

delay_class 1 1
delay_parameters 1 -1/-1
delay_access 1 allow admin
delay_access 1 deny all

#delay_class 2 1
#delay_parameters 2 1500/64000
#delay_access 2 allow download
#delay_access 2 deny all

#SNMP OPTIONS
snmp_port 3401
snmp_access allow localhost
snmp_access deny all

# ICP OPTIONS
icp_port 3130
udp_incoming_address 0.0.0.0
udp_outgoing_address 255.255.255.255

# DNS OPTIONS
ipcache_size 2048
ipcache_low 98
ipcache_high 99


# MISCELANEOUS
coredump_dir /var/spool/squid

httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

#PESAN ERROR
error_directory /usr/share/squid/errors/English

iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080

0 comments:

Posting Komentar

 
◄Design by Pocket