Home > internet, windows > Accelerating Koneksi Internet dan Menghemat Bandwidth dengan Squid Server Proxy versi Windows
05-2009 28

Neter yang berlangganan koneksi  internet mungkin sering mengalami koneksi yang tiba-tiba lambat, baik lambat karena bandwidth di turunkan karena batas quota abis (seperti langganan :Indosat 3G Broadband, Indosat M2, Telkomsel Flash, XL Unlimited), atau karena terlalu banyak yang pake koneksi internet (langganan Speedy). Memang sangat menjengkelkan bila hal itu terjadi, nah untuk mensiasati agar koneksi berjalan seolah-olah rada cepat ada beberapa cara, diantaranya adalah dengan meminimalkan content untuk browsing (ex: disable images pada browser anda), menggunakan compression proxy (toonel, onspeed), dan menggunakan cache proxy.

Pada artikel ini saya memilih menggunakan cahce proxy untuk menghemat bandwidth. Kenapa menggunakan cache proxy, karena cache proxy secara tidak langsung akan menghemat bandwidth yang kita gunakan, dengan cara menyimpan content yang sering didownload atau website yang sering dikunjungi pada cache proxy yang sudah diseting dikomputer kita. Proxy server yang saya gunakan adalah Squid 2.7.STABLE6, banyak artikel mengenai settingan proxy dengan squid tetapi kebanyakan berbasis linux, bagaimana untuk setingan proxy dengan squid berbasis windows? disini jawabannya.

Ok langsung saja, sebelum kita mulai dengan langkah setingan proxy dengan squid, ada baiknya download dulu Squid 2.7.STABLE6 (jangan lupa yang versi windows), setelah squid selesai di download, ekstrak filenya di C:squid

Setelah itu masuk ke dalam direktori C:squidetc.
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 :

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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.

  9. 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:squidsbin"

      C:>cd c:squidsbin
      C:squidsbin>
  10. Setelah masuk ke directory “cd C:squidsbin” melalui command prompt, kemudian ketik “squid -z“.
      C:squidsbin>squid -z
      2008/11/18 08:45:20| Creating Swap Directories
      C:squidsbin>
  11. Masih di “command prompt”, ketik “squid -d l -D“, kemudian tekan “CTRL+C“.
      C:squidsbin>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:squidsbin>

  12. Masih di “command prompt”, ketik “squid -i”
      C:squidsbin>squid -i
      Registry stored HKLMSOFTWAREGNUSquid2.6SquidConfigFile 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:squidsbin>

  13. Dan yang terakhir (masih di command prompt), ketik “squid -O -D”
      C:squidsbin>squid -O -D
      Registry stored HKLMSOFTWAREGNUSquid2.6SquidCommandLine value -D

      C:squidsbin>

  14. Untuk menghidupkan proxy, masuk ke “Control Panel” -> “Administrative Tools” -> “Services“. Kemudian cari nama services “squid” -> “Klik kanan” -> “Start“
  15. Arahkan proxy pada browser anda ke alamat “localhost” dengan port “3128“.
  16. 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:squidsbin>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….


Segera dapatkan DOMAIN GRATIS sesuai NAMA KAMU
Silahkan CEK di sini, 100% FREE (example: www.eric.co.cc)

  1. July 22nd, 2009 at 07:52 | #1

    wah ternyata bisa dipake di winsucks juga yah, selama ini saya dah pake ini di desktop dewalinux saya
    thanks infonya, bookmark dulu deh, kali ajah ntar ada yg nanya.
    btw, link just added

  2. July 22nd, 2009 at 07:54 | #2

    oiyah, kelupaan, caranya dibikin transparent proxy gmn yah? kalo di linux kan pake iptables, kalo di winsucks ini gmn yah?

  3. July 22nd, 2009 at 09:37 | #3

    @Belajar ngeblog: klo bikin transparent proxy di winsucks lum pernah coba sob, baru blajar seting proxy di winsucks.
    transparent proxy di winsucks perlu di coba tuch.. PR nich :)

  4. August 13th, 2009 at 21:10 | #4

    nice inpo mantab

  5. August 14th, 2009 at 14:35 | #5

    @unting: Terimakasih atas kunjungannya sobat, semoga ini bisa bermanfaat bagi sobat blogger. sukses selalu bloggers :)

  6. hanfies
    August 20th, 2009 at 07:02 | #6

    wah makasih mas info nya berguna. sudah saya coba dan berjalan dengan lancar. :D

  7. October 5th, 2009 at 09:02 | #7

    thanks atas infonya bro, sangat berguna bagi para pengguna inet yang dibatasi dengan quota bandwith

  8. October 10th, 2009 at 10:51 | #8

    @azka: sama-sama thanks juga, atas kunjungannya. salam bloggers, sukses slalu sobat.

  1. No trackbacks yet.


Top
Theme by NeoEase, Modify By AdiTofik. Valid XHTML 1.1 and CSS 3. Site Map.