Setingan SQUID

http_port 3128
#http_port 8080

#============transparent proxy=====================
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
forwarded_for on
icp_port 3130

# TAG: hierarchy
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY

# OPTIONS WHICH AFFECT THE CACHE SIZE

cache_mem 256 MB

#cache_swap_low 90
#cache_swap_high 95

maximum_object_size 256 MB
cache_replacement_policy heap GDSF
cache_dir ufs /cache 6000 16 256

#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 SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
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 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT

#===========Setingan untuk memblok situs porno=============
acl notsex url_regex -i “/etc/squid/bukansex”
http_access allow notsex all

acl sex url_regex -i “/etc/squid/sex”
http_access deny sex all

no_cache deny sex

# —————— User Internet

acl ok src 192.168.10.1-192.168.10.79/32
http_access allow ok

acl ok2 src 192.168.10.81-192.168.10.255/32
http_access allow ok2

acl absensi src 192.168.10.80/32
http_access deny absensi

#Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager
# Only allow purge requests from localhost
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
#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#
http_access allow localhost
# And finally deny all other access to this proxy
http_access deny all
icp_access allow all

visible_hostname xxx

#acl multimedia url_regex -i \.mp3$ \.rm$ \.mpg$ \.mpeg$ \.avi$ \.dat$ \.iso$ \.zip$ \.exe$ \.mov$ \.wma$ \.ac3$ \.cda$ \.vro$
#acl multimedia url_regex -i

#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$

#delay_pools 1
#delay_class 1 1
#delay_parameters 1 7000/16000
#delay_access 1 allow download
#delay_access 1 deny ALL

acl LTIME time SMTWHFA 09:00-18:00

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$

delay_pools 1

delay_class 1 1
delay_parameters 1 7000/16000
delay_access 1 allow download LTIME
delay_access 1 deny all

announce_period 1 month

Explore posts in the same categories: Linux

Comment: