Nama:
Lokasi: Indonesia
Postingan Sebelumnya
Visit the Site

Powered by Blogger

MARVEL and SPIDER-MAN: TM & © 2007 Marvel Characters, Inc. Motion Picture © 2007 Columbia Pictures Industries, Inc. All Rights Reserved. © 2007 Sony Pictures Digital Inc. All rights reserved.
Berbagi Pakai Internet menggunakan Squid di Windows
Selasa, 25 September 2007 |
Tutorial singkat ini akan membahas tentang alternatif berbagi pakai internet menggunakan software open source Squid. kita akan menggunakan MS Windows XP sebagai contoh, mungkin bisa diterapkan juga di Windows NT atau Windows 2000.
Untuk tutorial ini anda akan memerlukan ( tentunya ) Squid yang bisa di download dari http://www.serassio.it/SquidNT.htm ketika tulisan ini dibuat squid sudah mencapai versi 2.6 Stable 12. Hasil dari download akan berupa file zip, extract file tersebut ke C:\, sehingga di drive C akan muncul direktori baru dengan nama "squid".
Masuk ke direktori "c:\squid\etc", kita akan menemukan 3 buah file dengan nama “cachemgr.conf.default”, “mime.conf.default” dan “squid.conf.default”. Salin ketiga file tersebut dan rubah namanya

“cachemgr.conf.default” menjadi ”cachemgr.conf"
“mime.conf.default” menjadi “mime.conf”, dan
“squid.conf.default” menjadi “squid.conf”

Setelah ketiga file diatas dirubah namanya, kita hanya akan edit satu file saja yaitu file "squid.conf", buka file "squid.conf" menggunakan notepad atau text editor kesukaan anda. Disitu sudah ada konfigurasi default untuk squid, kita tidak akan merubah banyak konfigurasi tersebut, cukup rubah seperlunya saja, dalam file konfigurasi ini yang diawali dengan tanda “#” adalah comment atau keterangan saja dan diabaikan oleh squid.

  • Cari konfigurasi untuk “http_port”, pastikan nilainya 3128. bisa juga dirubah ke nilai lain tapi untuk sekarang biarkan saja 3128. pastikan barisnya sama dengan “http_port 3128”
# Squid normally listens to port 3128
http_port 3128
  • Cari tag “visible_hostname”, kurang lebih isinya sebagai berikut
# 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

tambahkan baris “visible_hostname localhost” dibawah “#none”, sehingga menjadi

# 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 localhost

  • Cari kata “our_networks”
#acl our_networks src 192.168.1.0/24 192.168.2.0/24
#http_access allow our_networks

di edit, dan hilangkan tand “#” dan sesuaikan dengan alamat jaringan anda ditambah dengan localhost, sehingga menjadi

acl our_networks src 192.168.1.0/24
http_access allow localhost
http_access allow our_networks
  • Cari section "dns_nameservers"
# 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

    Isikan baris dibawahnya dengan nama DNS ISP anda, untuk pelanggan dial-up, cara mengetahui alamat DNS ISP anda adalah, dengan mengetikkan “ipconfig /all” pada command prompt, setelah konek ke internet, dan cari entry DNS , biasanya ada dua alamat. Misalnya DNS ISP anda 10.10.10.1 dan 10.10.10.2, maka isikan baris sebagai berikut

# 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 10.10.10.1 10.10.10.2

Simpan file squid.conf, buka command prompt. Untuk yang punya keyboard dengan logo windows, tekan logo windows sambil menekan huruf “R”, dan ketikkan “cmd”. Maka akan muncul command prompt, masuk ke direktori "C:\squid\sbin", didalamnya ada file squid.exe, untuk pertama kali jalankan squid dengan option -z

\>squid -z
Output:
2007/04/23 18:31:13| Creating Swap Directories

Command diatas berfungsi untuk inisialisasi cache squid, setelah itu ketikkan
\>squid -d 1 -D
option “-d 1” digunakan untuk masuk ke debug level ( untuk diagnosa saja) dan option “-D” digunakan untuk membypass pengecekan DNS, berguna jika anda belum terkoneksi ke internet. kalau sukses outputnya kurang lebih seperti ini :
2007/04/23 18:31:31| Starting Squid Cache version 2.6.STABLE12 for i686-pc-winnt
...
2007/04/23 18:31:31| Running on Windows XP
2007/04/23 18:31:31| Process ID 3616
2007/04/23 18:31:31| With 2048 file descriptors available
2007/04/23 18:31:31| With 512 CRT stdio descriptors available
2007/04/23 18:31:31| Windows sockets initialized
2007/04/23 18:31:31| Using select for the IO loop
2007/04/23 18:31:31| DNS Socket created at 0.0.0.0, port 1054, FD 4
2007/04/23 18:31:31| Adding nameserver 202.134.1.10 from squid.conf
2007/04/23 18:31:31| Adding nameserver 202.134.0.155 from squid.conf
2007/04/23 18:31:31| User-Agent logging is disabled.
2007/04/23 18:31:31| Referer logging is disabled.
2007/04/23 18:31:31| Unlinkd pipe opened on FD 7
2007/04/23 18:31:31| Swap maxSize 102400 KB, estimated 7876 objects
2007/04/23 18:31:31| Target number of buckets: 393
2007/04/23 18:31:31| Using 8192 Store buckets
2007/04/23 18:31:31| Max Mem size: 8192 KB
2007/04/23 18:31:31| Max Swap size: 102400 KB
2007/04/23 18:31:31| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2007/04/23 18:31:31| Rebuilding storage in c:/squid/var/cache (DIRTY)
2007/04/23 18:31:31| Using Least Load store dir selection
2007/04/23 18:31:31| Set Current Directory to c:/squid/var/cache
2007/04/23 18:31:31| Loaded Icons.
2007/04/23 18:31:31| Accepting proxy HTTP connections at 0.0.0.0, port 3128, FD 12.
2007/04/23 18:31:31| Accepting ICP messages at 0.0.0.0, port 3130, FD 13.
2007/04/23 18:31:31| Accepting HTCP messages on port 4827, FD 14.
2007/04/23 18:31:31| Accepting SNMP messages on port 3401, FD 15.
2007/04/23 18:31:31| Ready to serve requests.
2007/04/23 18:31:31| Done scanning c:/squid/var/cache (0 entries)
2007/04/23 18:31:31| Finished rebuilding storage from disk.
2007/04/23 18:31:31| 0 Entries scanned
2007/04/23 18:31:31| 0 Invalid entries.
2007/04/23 18:31:31| 0 With invalid flags.
2007/04/23 18:31:31| 0 Objects loaded.
2007/04/23 18:31:31| 0 Objects expired.
2007/04/23 18:31:31| 0 Objects cancelled.
2007/04/23 18:31:31| 0 Duplicate URLs purged.
2007/04/23 18:31:31| 0 Swapfile clashes avoided.
2007/04/23 18:31:31| Took 0.6 seconds ( 0.0 objects/sec).
2007/04/23 18:31:31| Beginning Validation Procedure
2007/04/23 18:31:31| Completed Validation Procedure
2007/04/23 18:31:31| Validated 0 Entries
2007/04/23 18:31:31| store_swap_size = 0k
2007/04/23 18:31:32| storeLateRelease: released 0 objects

setelah yakin squid jalan, kita tinggal masukkan squid ke service windows dengan cara
\>squid -i
Output :
Registry stored HKLM\SOFTWARE\GNU\Squid\2.6\Squid\ConfigFile value c:/squid/etc/ squid.conf
Squid Cache version 2.6.STABLE12 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.

Dan Lanjutkan dengan mengetikkan
\>squid -O -D
Output :
Registry stored HKLM\SOFTWARE\GNU\Squid\2.6\Squid\CommandLine value -D
command diatas untuk memasukkan parameter -D ketika service dijalankan
Start service pertama kali, masuk ke control panel >> administrative tools >> services, cari service dengan nama “squid”, klik kanan trus start.
Konfigurasi di client tinggal masukkan saja alamat proxy ( alamat dimana squid diinstall) dan portnya 3128.
untuk informasi lebih lanjut atau konfigurasi yang lebih lengkap silahkan buka alamat proxy squid di http://www.squid-cache.org
Selamat mencoba.
Dikuti dari situsqta

Label:

diposting oleh palzum @ 11.00

2 Komentar:

Posting Komentar

Berlangganan Posting Komentar [Atom]

<< Beranda