squid.conf


http_port 3128

cp_port 3130

tcp_outgoing_address 0.0.0.0
udp_incoming_address 0.0.0.0
udp_outgoing_address 0.0.0.0

cache_mem 16 MB
maximum_object_size 128 MB

cache_dir ufs /misc/squid/c1 7000 8 128
cache_dir ufs /misc/squid/c2 7000 8 128
cache_dir ufs /misc/squid/c3 7000 8 128

cache_access_log /var/log/squid/access.log

cache_log /dev/null
cache_store_log /dev/null

logfile_rotate 4
memory_pools_limit 8 MB
redirect_rewrites_host_header on
#replacement_policy GDSF
half_closed_clients on

request_header_max_size 128 KB
request_body_max_size 5 MB

dns_nameservers 192.168.0.200

quick_abort_min 16 KB
quick_abort_max 16 KB
quick_abort_pct 95
connect_timeout 120 seconds
peer_connect_timeout 30 seconds
#siteselect_timeout 4 seconds
read_timeout 15 minutes
request_timeout 5 minutes
client_lifetime 1 day

#———–transparent proxy ———–
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
#——————————————-

#Script Membuka/Menutup akses sex
acl sex url_regex -i “/etc/squid/sex”
acl blok-website url_regex -i “/etc/squid/blok-website”

acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY

client_netmask 255.255.255.255

acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.0/255.255.255.0
acl lan_ku src 192.168.0.0/255.255.255.0
acl images urlpath_regex -i \.gif$ \.png$ \.jpg$ \.jpeg$
acl Safe_ports port 80 21 443 563 70 210 8888 1025-9000 6661-7000
acl CONNECT method CONNECT

#http_access allow localhost CONNECT
#http_access allow internet CONNECT

#akses sex ditutup
#——————–
http_access deny sex
http_access deny blok-website

http_access allow CONNECT
http_access allow localhost
http_access allow all
http_access allow lan_ku
http_access allow Safe_ports

http_access deny !Safe_ports
http_access deny CONNECT
http_access deny all

refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320

#—————- administration info ————
cache_mgr [EMAIL PROTECTED]
cache_effective_user squid
cache_effective_group squid
#log_icp_queries off
#cachemgr_passwd mypassword all
#forwarded_for off
#buffered_logs on
visible_hostname gw.net

Sumber: http://forum.linux.or.id/viewtopic.php?p=3970

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s