CARA MENGETAHUI CACHE DI PROXY CLEAROS

untuk melihat besar cache
[root@system] # du -sh /var/spool/squid

untuk melihat kapasitas yang dipakai di hardisk dalam bentuk %,
[root@system] # df –k atau # squidclient mgr:info | grep -i storage

untuk melihat lebih akurat

# squidclient mgr:info

jika sda3 lebih dari 80% maka cache harus direset

Cara setting ClearOs Squid External Proxy Mikrotik


Transparent Proxy adalah Proxy yang tidak terlihat oleh Client. Dengan menggunakan Transparent Proxy client dipaksa untuk memakai Proxy tanpa melakukan setting-an di browser. Squid adalah salah satu jenis Proxy yang paling umum dipakai.

Ip address Mikroik:
Ether0 =192.168.1.2------------------Ke internet
Ether1 =192.168.2.1------------------Ke Client
Ether2 =192.168.3.1------------------Ke Squid External ClearOs

Ip Address ClearOs:
eth0 =192.168.3.2------------------ip ClearOs

--Set Mikrotik

----Untuk interface Mikrotik:
/interface set 0 name=internet
/interface set 1 name=client
/interface set 2 name=squid

----Untuk ip address Mikrotik:
/ip address add address=192.168.1.2 netmask=255.255.255.0 interface=internet
/ip address add address=192.168.2.1 netmask=255.255.255.0 interface=client
/ip address add address=192.168.3.1 netmask=255.255.255.0 interface=squid

----Untuk Gateway Mikrotik:
/ip route add gateway=192.168.1.1

----Untuk DNS Mikrotik:
/ip dns set primary-dns=203.130.193.74,203.130.206.250 allow-remote-requests=yes

----Untuk Nat Mikrotik:
/ip firewall nat add chain=srcnat out-interface=internet action=masquerade
/ip firewall nat add chain=dstnat src-address=!192.168.3.0/24 protocol=tcp dst-port=80 action=dst-nat to-addresses=192.168.3.2 to-ports=3128 comment="" disabled=no

--Set ClearOs

----Install ClearOS Server Standalone Mode – No Firewall
edit file /etc/firewall, cari dan ganti parameter berikut

SQUID_TRANSPARENT="off"

ubah menjadi :
SQUID_TRANSPARENT="on"

#service squid restart

----edit file /etc/resolv.conf, tambahkan nameserver (DNS) ISP anda

cat resolv.conf

nameserver 203.130.193.74


----pastikan gateway proxy sudah ke IP PROXY Mikrotik,lihat file ifcfg-eth0
ada di direktory /etc/sysconfig/network-scripts


cat ifcfg-eth0

DEVICE=eth0
TYPE="Ethernet"
ONBOOT="yes"
USERCTL="no"
BOOTPROTO="static"
IPADDR="192.168.3.2"
NETMASK="255.255.255.0"
HWADDR="00:80:da:24:6c:73"
GATEWAY="192.168.3.1"


Jalankan Webproxy di ClearOS, yang ada pada menu Gateway>Web Proxy
Klik Start dan buat Automatic

---Selamat Mencoba---

melihat efektifitas squid

udah pasang squid sebagai proxy cache di jaringan lan ? mau tau seberapa efektif squid tersebut ? gampang, gunakan squidclient .

kalau di ubuntu 10 yang saya gunakan sekarang, install squid client cukup dengan command ” sudo apt get install squidclient ”

penggunaan tools squidclient sebagai berikut :

squidclient -p mgr:info

contoh :

root@proxyku:~# squidclient -p 3128 127.0.0.1 mgr:info
HTTP/1.0 200 OK
Date: Sat, 17 Sep 2011 05:14:48 GMT
Content-Type: text/plain
Expires: Sat, 17 Sep 2011 05:14:48 GMT
X-Cache: MISS from proxy
X-Cache-Lookup: MISS from proxy:3128
Via: 1.0 proxy:3128
Connection: close

Squid Object Cache: Version 2.
Start Time: Sat, 17 Sep 2011 01:18:24 GMT
Current Time: Sat, 17 Sep 2011 05:14:48 GMT
Connection information for squid:
Number of clients accessing cache: 21
Number of HTTP requests received: 51279
Number of ICP messages received: 0
Number of ICP messages sent: 0
Number of queued ICP replies: 0
Number of HTCP messages received: 0
Number of HTCP messages sent: 0
Request failure ratio: 0.00
Average HTTP requests per minute since start: 216.9
Average ICP messages per minute since start: 0.0
Select loop called: 1111773 times, 12.758 ms avg
Cache information for squid:
Request Hit Ratios: 5min: 23.6%, 60min: 34.6%
Byte Hit Ratios: 5min: 77.2%, 60min: 68.5%
Request Memory Hit Ratios: 5min: 5.4%, 60min: 3.6%
Request Disk Hit Ratios: 5min: 60.5%, 60min: 77.2%
Storage Swap size: 3259016 KB
Storage Mem size: 8172 KB
Mean Object Size: 19.17 KB
Requests given to unlinkd: 0
Median Service Times (seconds) 5 min 60 min:
HTTP Requests (All): 0.30459 0.20843
Cache Misses: 0.49576 0.49576
Cache Hits: 0.00307 0.00091
Near Hits: 0.00000 0.12106
Not-Modified Replies: 0.00000 0.00000
DNS Lookups: 0.00000 0.00000
ICP Queries: 0.00000 0.00000
Resource usage for squid:
UP Time: 14183.987 seconds
CPU Time: 78.161 seconds
CPU Usage: 0.55%
CPU Usage, 5 minute avg: 0.44%
CPU Usage, 60 minute avg: 0.76%
Process Data Segment Size via sbrk(): 39860 KB
Maximum Resident Size: 184096 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
Total space in arena: 39860 KB
Ordinary blocks: 39371 KB 6821 blks
Small blocks: 0 KB 0 blks
Holding blocks: 3648 KB 4 blks
Free Small blocks: 0 KB
Free Ordinary blocks: 488 KB
Total in use: 43019 KB 99%
Total free: 488 KB 1%
Total size: 43508 KB
Memory accounted for:
Total accounted: 27072 KB
memPoolAlloc calls: 8535465
memPoolFree calls: 8057760
File descriptor usage for squid:
Maximum number of file descriptors: 1024
Largest file desc currently in use: 177
Number of file desc currently in use: 117
Files queued for open: 0
Available number of file descriptors: 907
Reserved number of file descriptors: 100
Store Disk files open: 0
IO loop method: epoll
Internal Data Structures:
170223 StoreEntries
1741 StoreEntries with MemObjects
1732 Hot Object Cache Items
169980 on-disk objects
root@proxyku:~#

beberapa item penting yang perlu di perhatikan adalah :

Number of clients accessing cache: 21 << jgn sampai lebih dari jumlah pc di lan, kalau lebih mungkin ada maling :D

Request Hit Ratios: 5min: 23.6%, 60min: 34.6% << persen request yang berhasil di cache dari proxy
Byte Hit Ratios: 5min: 77.2%, 60min: 68.5% << persen byte data yang di ambil dari proxy , bukan dari internet lansung

kalau dari data yang saya ambil dari server proxy ini, hasil nya cukup lumayan, ada penghematan bandwidth sebanyak 30 - 60 % .

Promo AKHIR TAHUN

JAM TANGAN PRIA 100RB AN

JAM TANGAN PRIA 100RB AN
JAM TANGAN PRIA 100RB AN

Berlangganan

Popular Posts

Total Pageviews

Blogger templates

Powered by Blogger.
Back to top