Transparent Proxy

By , December 22, 2009 7:29 am

Dibawah ini adalah contoh transparent proxy yang pernah saya buat

http_port 3128
icp_port 3130

cache_peer proxies.telkom.net.id parent 8080 3130 proxy-only

hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY

cache_mem 20 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 2048 KB
maximum_object_size_in_memory 16 KB
ipcache_size 2048
ipcache_low 99
fqdncache_size 2048
cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF

cache_dir aufs /proxy/cache1 2300 16 256
cache_dir aufs /proxy/cache2 2300 16 256

cache_access_log /usr/local/squid/logs/access.log
cache_log /usr/local/squid/logs/cache.log
cache_store_log none
cache_store_log /dev/null
emulate_httpd_log off

mime_table /usr/local/squid/etc/mime.conf
log_mime_hdrs off
pid_filename /usr/local/squid/logs/squid.pid
debug_options ALL,1
log_fqdn off
log_icp_queries off
client_netmask 255.255.255.255
ftp_user webmaster@yourhostname
ftp_list_width 32

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

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 yourname src 192.168.1.0/255.255.255.0
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 CONNECT method CONNECT

http_access allow manager localhost
http_access deny manager
http_access allow yourname
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny all
icp_access allow yourname
icp_access deny all
cache_mgr webmaster@yourhostname
cache_effective_user squid
cache_effective_group squid
visible_hostname yourhostname
logfile_rotate 7
buffered_logs on
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_single_host off
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
memory_pools off
ie_refresh off

#Tracker
announce_period 0
announce_host none
announce_port 3131
acl FTP proto FTP
always_direct allow FTP

Leave a Reply

Panorama Theme by Themocracy