1. Mengecek squid sudah terinstall atau belum :
# dpkg -P squid
debian:~# dpkg -P squid
(Sedang membaca basis data ...66464 berkas dan direktori telah terpasang.)
Sedang membuang squid ...
Stopping Squid HTTP proxy: squid.
Sedang memusnahkan berkas konfigurasi untuk squid ...
Purging startup links ..
Purging logfiles ..
Removing the config-file ..
Remove the proxy cache in /var/spool/squid yourself!
dpkg - PERINGATAN: ketika membuang squid, direktori `/var/spool/squid' tidak kosong, jadi tidak dibuang.
dpkg - PERINGATAN: ketika membuang squid, direktori `/etc/squid' tidak kosong, j adi tidak dibuang.
2. Menghapus rule NAT di pc router
# iptables -t nat –F
debian # iptables -t nat –F
3. Melakukan ping atau mtr dari PC client ke arah server eepis-its.edu (202.154.187.2) dan pastikan TIDAK terkoneksi !!!
4. Installasi aplikasi proxy “squid” di mesin PC router
# apt-get install squid
debian:~# apt-get install squid
Reading package lists... Done
Building dependency tree... Done
Suggested packages:
squidclient squid-cgi logcheck-database resolvconf smbclient
The following NEW packages will be installed:
squid
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/655kB of archives.
After unpacking 1647kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
squid
Install these packages without verification [y/N]? y
Prakonfigurasi paket ...
Memilih paket squid yang sebelumnya tidak dipilih.
(Sedang membaca basis data ...66429 berkas dan direktori telah terpasang.)
Sedang membuka paket squid (dari .../squid_2.6.5-6etch1_i386.deb) ...
Sedang menyetel squid (2.6.5-6etch1) ...
Restarting Squid HTTP proxy: squid.
5. Merubah konfigurasi pada /etc/squid/squid.conf di mesin PC router, supaya memperbolehkan IP client di jaringannya dapat mengakses ke jaringan luar.
# vim /etc/squid/squid.conf
debian # vim /etc/squid/squid.conf
Cari bagian :
#acl our_networks src 192.168.1.0/24 192.168.2.0/24
#http_access allow our_networks
tips: Pada vim dapat dilakukan dengan : ESC – tekan tombol / - ketik “our_network”. Rubah menjadi : (isi dengan IP jaringan dan hilangkan tanda # didepannya)
acl our_networks src 192.168.1.0/24
http_access allow our_networks
6. Restart aplikasi squid dengan cara :
# /etc/init.d/squid restart
debian:~# /etc/init.d/squid restart
Restarting Squid HTTP proxy: squid.
7. Pada PC client, buka aplikasi web browser (iceweasel), rubah preferences untuk proxy. Isikan dengan IP mesin proxy dan portnya.
Contoh :
HTTP Proxy : 192.168.1.1 dengan port : 3128
8. Pada PC Client, lakukan akses ke alamat web http://noc.eepis-its.edu atau http://www.eepis-its.edu (Tidak mengakses ke INTERNET !!!)
http://noc.eepis-its.edu
http://www.eepis-its.edu
9. Menampilkan report dari client yang menggunakan proxy yang ada di /var/log/squid/access.log
# tail -f /var/log/squid/access.log
debian:~# tail -f/var/log/squid/access.log
tail: invalid option -- /
Try `tail --help' for more information.
debian:~# tail -f /var/log/squid/access.log
1212225017.216 56 192.168.2.100 TCP_MISS/200 16167 GET http://noc.eepis-its.edu/ - DIRECT/202.154.187.2 text/html
1212225061.743 486 192.168.2.100 TCP_MISS/200 18431 GET http://eepis-its.edu/ - DIRECT/202.154.187.5 text/html
1212225062.963 226 192.168.2.100 TCP_MISS/200 14032 GET http://eepis-its.edu/home.php - DIRECT/202.154.187.5 text/html
1212225063.207 140 192.168.2.100 TCP_MISS/200 3466 GET http://eepis-its.edu/news_home.php? - DIRECT/202.154.187.5 text/html
1212225063.222 888 192.168.2.100 TCP_MISS/200 18431 GET http://eepis-its.edu/ - DIRECT/202.154.187.5 text/html