Tuesday, December 9, 2008

Proxy dengan squid3 Debian

Membuat Proxy Dengan Squid3 (debian)

Fungsi:
1.Menyimpan cache tampilan halaman web
2.Mengatur bandwidth internet ke client
3.Mengontrol aktivitas client (misalnya hak akses situs tertentu, melihat situs-situs yang dikunjungi client).

Bahan Membuat proxy:
1.Komputer minimal 2 lan card.
2.Komputer client
3.Sambungan internet

Langkah-langkah membuat proxy:
1.Setting ip server
#vim /etc/network/interfaces
iface eth0 inet static
address 192.168.2.35
netmask 255.255.255.192
network 192.168.2.0
broadcast 192.168.2.63
gateway 192.168.2.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 202.134.0.155
dns-search smkn1-tuban.sch.id
esc:wq
/etc/init.d/networking restart ->>merestrat lan card

2.install packet squid3
#apt-get install squid3

3.membuat partisi squid
#squid3 -z

4.Melakukan konfigurasi squid
Perhatian: untuk keamanan sebelum dilakukan konfigurasi sebaiknya file configurasi asli squid
disimpan dulu.
#cp /etc/squid3/squid.conf /etc/squid3/squid.conf_asli
#vim /etc/squid3/squid.conf
acl our_networks src 192.168.1.0/28 192.168.2.0/25 172.16.2.0/24
http_access allow our_networks
http_access allow localhost

#untuk melakukan blokir
acl backlist url_regex -i "/usr/share/backlist"
http_access deny backlist

esc:wq

5.Merestart squid
#/etc/init.d/squid3 restart

6.Setting client


7.Menguji proxy
#tail -f /var/log/squid/access.log
1227631428.251 54487 192.168.2.52 TCP_MISS/301 2670 GET
ttp://www.imsly.com/ index.php/1010110A/531 4c86178909cb03cf62f3bf5dd73960ed7fcff70e6f625 afa4f41b54a210b566d466f5660823604d4f793de361185cca7072d35c9901687c99174cb0a321560 - IRECT/67. 159.47.205 text/htm l
1227631428.415 49394 192.168.2.52 TCP_MISS/200 4497 GET http://www.imsly.com/index.php/1010110A/5314c861789d98a732fd3938feda699a039de1ee61bbb533b3a0b81450af12a33ab660f66c467d5b5651336fc571537be02d2c8a4acf1117279e4e5d21560 - DIRECT/67.159.47.205 application/x-shockwave-flash
1227631428.487 11472 192.168.2.88 TCP_MISS/200 4029 GET http://tbn2.google.com/images? - DIRECT/64.233.189.99 image/jpeg
1227631428.543 11449 192.168.2.25 TCP_MISS/200 3603 GET http://drycounty.com/downloads/wallpapers/thm_bjw_kimdesmet_bj10.jpg - DIRECT/88.198.34.147 image/jpeg
1227631428.572 47443 192.168.2.81 TCP_MISS/200 1004 GET http://www.brothersoft.com/img/a74.gif - DIRECT/125.160.16.42 image/gif
1227631428.705 284 192.168.2.93 TCP_MISS/200 604 GET http://www.google.co.id/verify/EAAAAKai9XHxkw7aKzNjRDgZjxs.gif - DIRECT/72.14.235.147 image/gif
1227631428.782 362 192.168.2.93 TCP_MISS/200 1938 GET http://tbn3.google.com/images? - DIRECT/64.233.189.99 image/jpeg

No comments: