You are on page 1of 6

Page | 1

INSTALASI DAN KONFIGURASI


TRANSPARENT SQUID PROXY SERVER
PADA LINUX DEBIAN WHEEZY
Instalasi Sistem Operasi Linux Debian 7 (Wheezy)
Catatan Pre-Instalasi:
- Asumsi PC dalam keadaan baik (siap untuk digunakan),
- Pastikan kabel power, monitor, dan keyboard sudah terpasang dengan benar.
- Pasang flashdisk installer ke port USB
- Lepas kabel UTP ke sumber internet agar instalasi OS sepenuhnya bersumber
pada UFD.
- Tekan power untuk menyalakan komputer
- Tekan tombol "Delete" terus-menerus untuk masuk ke pengaturan BIOS, dan
set agar booting dari UFD installer.

Pilih Install pada tampilan pertama.


[!!] Select a language
-> English
[!!] Select your location
-> other
-> Asia
-> Indonesia
[!] Configure locales
-> United States - en_US.UTF-8
[!!] Configure the keyboard
-> American English
[!!] Configure the network
-> Primary network interface:
-> ...
-> <Continue>
-> Configure network manually
-> IP Address:
-> Netmask:
-> Gateway:
-> Name server address:
-> Hostname:
-> Domain name:

eth0

172.30.30.$ ($=2 s/d 14)


255.255.255.240
172.30.30.1
172.30.30.1
server$
smkn1cipanas.net

Catatan: Tanda $ diisi sesuai nomor urut meja peserta Ujikom.

asepwaluya@smkn1cipanas.net

Page | 2

[!!] Set up users and passwords


-> Root passwords:
-> Re-enter password to verify:
-> Full name for the new user:
-> Username for your account:
-> choose a password for the new
-> Re-enter password to verify:

1
1
<nama lengkap peserta ujikom>
<nama depan/panggilan peserta>
user: 1
1

Setting up the clock


[!] Configure the clock
-> Western (Sumatra, Jakarta, Java, West and Central Kalimantan)
[!!] Partition disks
-> Partitioning method:
-> Select disk to partition:
-> Partitioning scheme:

Guided - use entire disk


320.1 GB ATA WDC WD3200AAKC-0
All files in one partition
(recomended for new users)

-> Finish partitioning and write changes to disk


-> Write the changes to disks?:
<Yes>
[!] Configure the package manager
-> Use a network mirror?:

<No>

[!] Configuring popularity-contest


-> Participate in the package usage survey?:

<No>

[!] Software selection


-> Choose software to install:
[ * ] Debian desktop environment <hilangkan bintang pada baris ini
dengan menekan spasi>
[ * ] Standar system utilities
<Continue>
[!] Install the GRUB boot loader on hard disk
-> Install the GRUB boot loader to the master boot record?:
<Yes>
[!!] Finish the installation:

<Continue>

Setelah instalasi Linux Debian selesai, lakukan konfigurasi kembali pada BIOS
agar booting dari Hard Disk Drive (HDD). Untuk masuk pada konfigurasi BIOS,
tekan tombol "Delete" terus menerus, hingga halaman BIOS tampil pada
layar monitor.

asepwaluya@smkn1cipanas.net

Page | 3

Instalasi dan Konfigurasi Aplikasi


1. Cek koneksi ke internet:
Sebelum melakukan instalasi aplikasi dan konfigurasi pada server, terlebih
dahulu lakukan pengecekan koneksi ke internet dengan perintah:
# ping detik.com
2. Konfigurasi Interface eth1
Untuk mengaktifkan interface eth1 lakukan konfigurasi pada file interfaces sebagai
berikut:
# nano /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface (diseting pada saat instalasi)
allow-hotplug eth0
iface eth0 inet static
address 172.30.30.$ **)
netmask 255.255.255.240
network 172.30.30.0
broadcast 172.30.30.15
gateway 192.168.2.99
+ allow-hotplug eth1
+ iface eth1 inet static
+
address 192.168.11.1
+
netmask 255.255.255.0
+
network 192.168.11.0
+
broadcast 192.168.11.255
+
gateway 172.30.30.$ **) gunakan ip address pada blok eth0
# dns-* options are implemented by the resolv.conf package, if installed
dns-nameservers 192.168.2.99
dns-search smkn1cipanas.net
Setelah selesai konfigurasi eth1, simpan dan exit dengan menekan kombinasi
CTRL + X lalu Y kemudian Enter .
3. Setup Sharing Internet
Agar PC windows dapat mengakses internet melalui Squid Proxy Server, buat aturan
berikut:
# nano /etc/rc.local
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128

asepwaluya@smkn1cipanas.net

Page | 4

Setelah selesai melakukan konfigurasi pada file interfaces & rc.local, restart
server untuk mengaktifkan interface eth1 dan NAT .
# reboot
4. Cek Konfigurasi Interface eth1 dan NAT
Untuk mengetahui apakah interface eth1 sudah up/aktif, cek dengan perintah:
# ifconfig
Cek IP Forward, pastikan hasilnya berupa angka 1.
# cat /proc/sys/net/ipv4/ip_forward
Pastikan NAT MASQUERADE dan NAT REDIRECT telah aktif. Pengecekkan dapat
dilakukan dengan command:
# iptables t nat L
5. Setup Repository
Agar Sistem Operasi Linux Debian dapat melakukan instalasi melalui
Command Line Interface (CLI), maka terlebih dahulu harus dilakukan
konfigurasi pada file sources.list.
# nano /etc/apt/sources.list
deb http://ftp.au.debian.org/debian/ wheezy main contrib
deb-src http://ftp.au.debian.org/debian/ wheezy main contrib
deb http://ftp.au.debian.org/debian/ wheezy-updates main
deb-src http://ftp.au.debian.org/debian/ wheezy-updates main
deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main
#
#
#
#
#
#
#

wheezy-updates, previously known as 'volatile'


A network mirror was not selected during install. The following entries
are provided as examples, but you should amend them as appropriate
for your mirror of choice.
deb http://ftp.debian.org/debian/ wheezy-updates main
deb-src http://ftp.debian.org/debian/ wheezy-updates main

Setelah melakukan konfigurasi pada file sources.list, lakukan update database


repo pada system. Hal ini harus dilakukan agar OS dapat melakukan instalasi
aplikasi melalui repo.
# apt-get update
6. Instalasi dan Konfigurasi Squid Proxy Server
Untuk menginstalasi aplikasi Squid dapat dilakukan dengan perintah:
# apt-get install squid ccze
Catatan: Jika ada pertanyaan, jawab dengan menekan tombol Y untuk
melanjutkan.
Setelah proses instalasi selesai, lakukan konfigurasi yg dibutuhkan untuk
memenuhi SKL Ujikom pada file konfigurasi squid

asepwaluya@smkn1cipanas.net

Page | 5

# nano /etc/squid/squid.conf
a. Pada baris paling atas, dalam file squid.conf, tambahkan parameter:
visible_hostname tkj.smkn1cipanas.net
cache_mgr <nama_peserta>@smkn1cipanas.net
b. Membuka akses internet untuk klien localnet
Lakukan pencarian [CTRL+W] untuk keyword: #http_access allow
hilangkan tanda pagar (hashtag)
Sebelum
Sesudah

#http_access allow localnet


http_access allow localnet

c. Setup transparent untuk port Squid 3128


Lakukan pencarian [CTRL+W] untuk keyword: http_port 3128
tambahkan kata transparent setelah parameter 3128
Sebelum
Sesudah

http_port 3128
http_port 3128 transparent

d. Setup alokasi besaran HDD dan direktori yang akan digunakan untuk
menyimpan cache (cache_dir)
Lakukan pencarian [CTRL+W] untuk keyword: cache_dir ufs /var
hilangkan hashtag dan spasi setelahnya, ubah nilai 100 menjadi 5000
Sebelum
Sesudah

# cache_dir ufs /var/spool/squid 100 16 256


cache_dir ufs /var/spool/squid 5000 16 256

e. Setup access-list untuk blok web tertentu


Lakukan pencarian [CTRL+W] untuk keyword: acl CONNECT
Tambahkan baris acl berikut di bawah baris acl CONNECT
acl BLOK dstdomain .detik.com .youtube.com
http_access deny BLOK
Simpan perubahan yang telah dibuat pada file squid.conf [CTRL+X] [ Y ]
[ Enter ]
Lakukan verifikasi terhadap perubahan pada file konfigurasi squid
# service squid stop
# squid -k parse
Jika ada pesan error, perbaiki file konfigurasi squid dan lakukan pengecekkan
kembali. Pengecekkan dilakukan sampai pesan error konfigurasi squid tidak
muncul kembali.
Catat! Tidak boleh melanjutkan ke perintah selanjutnya jika masih ada pesan error
konfigurasi.
Buat swap (cache directory) dan aktifkan kembali aplikasi Squid Proxy Server-nya
# squid -z
# service squid start
Keterangan kotak:
Kotak tanpat putus: Command Line Interface diinput pada Terminal
Kotak putus-putus: parameter untuk diinput pada Text editor, i.e. nano

asepwaluya@smkn1cipanas.net

Page | 6

Good luck

asepwaluya@smkn1cipanas.net

You might also like