squid.conf Sederhana en Buat Transparent Proxy


http_port 3128 transparent
icp_port 0

cache_mem 128 MB
dns_nameservers 127.0.0.1
cache_swap_low 90
cache_swap_high 95
cache_dir aufs /var/spool/squid 40000 16 256
logfile_rotate 10

cache_effective_user squid
cache_effective_group squid

cache_peer 211.142.116.205 parent 8080 0 no-query no-digest
cache_peer 200.46.243.199 sibling 8080 0 no-query no-digest
cache_peer 63.238.216.26 sibling 80 0 no-query no-digest
cache_peer 218.44.245.36 sibling 8080 0 no-query no-digest

visible_hostname squid.gitu.loh

acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY

ftp_user ftp@squid.gitu.loh

acl all src 0.0.0.0/0.0.0.0
acl daleman src 10.1.1.0/255.255.255.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 631 # cups
acl Safe_ports port 777 # multiling http
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
acl FTP proto FTP

# authentication configuration:
#acl myauth proxy_auth REQUIRED

http_access allow manager localhost daleman
http_access deny manager

http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports

http_access allow daleman
http_access allow localhost
http_access deny all

forwarded_for off

httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

Bagian penting utk transparent proxy adalah:
tambahan kata “transparent” di baris: “http_port 3128 transparent”
lalu beberapa baris berikut:

httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

One Comment Add yours

  1. Pingback: squid

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