You are on page 1of 5

Setelah itu masuk ke dalam direktori C:\squid\etc.

Di sana anda akan menemui 4 buah file yaitu:


cachemgr.conf.default
mime.conf.default
squid.conf.default
squid_radius_auth.conf.default

Setelah itu ubah tulisan default pada semua file menjadi


cachemgr.conf
mime.conf
squid.conf
squid_radius_auth.conf

Buka teks editor kesayangan anda, bisa gunakan notepad atau wordpad, buka file
squid.conf.
Kemudian cari parameter-parameter berikut ini :
TAG: http_port
Port ini akan digunakan oleh squid. Port defaultnya adalah 3128. Kamu masukin
http_port 3128 di bawah tulisan # Squid normally listens to port 3128.
Ex:

# TAG: http_port
# Usage: port [options]
# hostname:port [options]
# 1.2.3.4:port [options]
#
…………………………..
#
# Squid normally listens to port 3128
http_port 3128
TAG: visible_hostname
Digunakan untuk menampilkan nama yang digunakan ketika terjadi pesan kesalahan.
Tambahkan tulisan visible_hostname <nama yang kamu kehendaki> di bawah tulisan
none, seperti di bawah ini.

# TAG: visible_hostname
# If you want to present a special hostname in error messages, etc,
# define this. Otherwise, the return value of gethostname()
# will be used. If you have multiple caches in a cluster and
# get errors about IP-forwarding you must set them to have individual
# names with this setting.
#
#Default:
# none
visible_hostname kostblogger.com
Tag: http_access
Menambahkan http_access allow localhost, dimaksudkan untuk membuat agar komputer
server proxy dapat mengakses proxy yang dipasang pada dirinya. Tambahkan di bawah
localnet.

# TAG: http_access
# Allowing or Denying access based on defined access lists
#
# Accessi to the HTTP port:
# http_access allow|deny [!]aclname …
#
# NOTE on default values:
#
# If there are no "access" lines present, the default is to deny
# the request.
#
# If none of the "access" lines cause a match, the default is the
# opposite of the last line in the list. If the last line was
# deny, the default is allow. Conversely, if the last line
# is allow, the default will be deny. For these reasons, it is a
# good idea to have an "deny all" or "allow all" entry at the end
# of your access lists to avoid potential confusion.
#
#Default:
# http_access deny all
#
#Recommended minimum configuration:
#
…………………………………………..
# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
http_access allow localnet
http_access allow localhost
TAG: dns_nameservers
Untuk mencari tau berapa DNS kita di windows, gunakan command ipconfig /all pada
command prompt. Kemudian cari DNS servernya. Kemudian masukkan DNS server yang
didapat dari command tadi dengan format dns_nameserver [primary] [secondary]

# TAG: dns_nameservers
# Use this if you want to specify a list of DNS name servers
# (IP addresses) to use instead of those given in your
# /etc/resolv.conf file.
# On Windows platforms, if no value is specified here or in
# the /etc/resolv.conf file, the list of DNS name servers are
# taken from the Windows registry, both static and dynamic DHCP
# configurations are supported.
#
# Example: dns_nameservers 10.0.0.1 192.172.0.4
#
#Default:
# none
dns_nameservers 202.155.0.10 202.155.0.15
Tag: cache_mem
Digunakan untuk menentukan besarnya cache memory yang akan digunakan oleh squid
untuk melakukan caching object. Sebaiknya nilainya 1/4 - 1/2 dari total keseluruhan
RAM. Dan ukuran ini akan digunakan oleh squid sebagai batas maksimal penggunaan
memory.

# TAG: cache_mem (bytes)


#
……………………………………
# If circumstances require, this limit will be exceeded.
# Specifically, if your incoming request rate requires more than
# ‘cache_mem’ of memory to hold in-transit objects, Squid will
# exceed this limit to satisfy the new requests. When the load
# decreases, blocks will be freed until the high-water mark is
# reached. Thereafter, blocks will be used to store hot
# objects.
#
#Default:
# cache_mem 8 MB
cache_mem 64 MB
Tag: maximum_object_size_in_memory
Menentukan besar maksimal object yang akan di-caching pada memory. Object yang
lebih besar dari nilainya tidak akan dicache oleh squid.

# TAG: maximum_object_size_in_memory (bytes)


# Objects greater than this size will not be attempted to kept in
# the memory cache. This should be set high enough to keep objects
# accessed frequently in memory to improve performance whilst low
# enough to keep larger objects from hoarding cache_mem.
#
#Default:
# maximum_object_size_in_memory 8 KB
maximum_object_size_in_memory 1024 KB
Tag: maximum_object_size
Menentukan besarnya object yang akan disimpan di harddisk.

# TAG: maximum_object_size (bytes)


# Objects larger than this size will NOT be saved on disk. The
# value is specified in kilobytes, and the default is 4MB. If
# you wish to get a high BYTES hit ratio, you should probably
# increase this (one 32 MB object hit counts for 3200 10KB
# hits). If you wish to increase speed more than your want to
# save bandwidth you should leave this low.
#
# NOTE: if using the LFUDA replacement policy you should increase
# this value to maximize the byte hit rate improvement of LFUDA!
# See replacement_policy below for a discussion of this policy.
#
#Default:
# maximum_object_size 4096 KB
maximum_object_size 4096 KB
Tag: minimum_object_size
Digunakan untuk menentukan besarnya file minimum yang akan disimpan di dalam
harddisk.

# TAG: minimum_object_size (bytes)


# Objects smaller than this size will NOT be saved on disk. The
# value is specified in kilobytes, and the default is 0 KB, which
# means there is no minimum.
#
#Default:
# minimum_object_size 0 KB
minimum_object_size 0 KB

Jangan lupa untuk menyimpan (CTRL+S) “squid.conf” yang baru saja kita edit tadi.
Selanjutnya buka "Command Prompt", dengan cara klik start menu
-> run ketik cmd. kemudian masuk ke directory "squid" tadi melalui "Command Prompt".
Contohnya adalah dengan mengetik "cd C:\squid\sbin\"

C:\>cd c:\squid\sbin\
C:\squid\sbin>
Setelah masuk ke directory “cd C:\squid\sbin\” melalui command prompt, kemudian
ketik “squid -z“.
C:\squid\sbin>squid -z
2008/11/18 08:45:20| Creating Swap Directories
C:\squid\sbin>
Masih di “command prompt”, ketik “squid -d l -D“, kemudian tekan “CTRL+C“.
C:\squid\sbin>squid -d l -D
2008/11/18 08:46:17| Starting Squid Cache version 2.7.STABLE5 for i686-pc-winnt.
..
2008/11/18 08:46:17| Running on Windows XP

C:\squid\sbin>
Masih di “command prompt”, ketik “squid -i”
C:\squid\sbin>squid -i
Registry stored HKLM\SOFTWARE\GNU\Squid\2.6\Squid\ConfigFile value
c:/squid/etc/
squid.conf
Squid Cache version 2.7.STABLE5 for i686-pc-winnt
installed successfully as Squid Windows System Service.
To run, start it from the Services Applet of Control Panel.
Don’t forget to edit squid.conf before starting it.

C:\squid\sbin>
Dan yang terakhir (masih di command prompt), ketik “squid -O -D”
C:\squid\sbin>squid -O -D
Registry stored HKLM\SOFTWARE\GNU\Squid\2.6\Squid\CommandLine value -D

C:\squid\sbin>
Untuk menghidupkan proxy, masuk ke “Control Panel” -> “Administrative Tools” ->
“Services“. Kemudian cari nama services “squid” -> “Klik kanan” -> “Start“
Arahkan proxy pada browser anda ke alamat “localhost” dengan port “3128“.
Test dengan mengunjungi situs-situs yang sering anda buka.

Anda juga bisa menghapus services squid tersebut dengan cara mengetikkan perintah
“squid -r -n squid” di Command Prompt.
C:\squid\sbin>squid -r -n squid
Service squid deleted successfully.

Demikian mungkin langkah-langkah yang harus ditempuh untuk menginstall squid proxy
di windows. Jika ada yang kurang dengan tulisan ini, mohon tambahannya. Jika tulisan
ini membantu neter, saya akan merasa senang sekali. Semoga artikel ini bermanfaat bagi
neter, Selamat Mencoba….

Untuk melakukan block suatu situs bisa menambahkan ACL seperti berikut

acl blocklist url_regex sex

http_access deny blocklist

dengan tambahan acl diatas maka setiap alamat url dengan kata sex akan di block

You might also like