Anda di halaman 1dari 21

2012

Pembahasan Soal Uji


Kompetensi
Paket 2
Pembahasan berikut menggunakan Debian Server 5 Lenny (server) dan
Windows 7 (client) khusus untuk persiapan Uji Kompetensi TKJ.

Amroe
SMK Tunas Pelita Binjai
3/5/2012

Hal |1

Tutorial berikut ini dibatasi hanya untuk membahas soal Uji Kompetensi 2011-2012 | Paket
2 yang dilaksanakan pada tahun 2012 ini. Pada kesempatan ini pada tutorial ini tidak akan
dibahas langkah-langkah Instalasi Debian Server 5 (Lenny) karena akan difokuskan pada
cara mengerjakan tugas dari soal saja.
Adapun tugas yang harus dikerjakan adalah sebagai berikut :
1. Membangun DNS dan Web Server pada jaringan
Opsi konfigurasi :
Konfigurasi Server
1. IP Virtual
2. IP LAN

= Sesuai dengan kondisi lab. Jaringan yang diberikan


= 192.168.50.1/24

Konfigurasi Client
3. IP LAN
= 192.168.50.xxx/24
4. Proxy
= 192.168.50.1
Keterangan : xxx merupakan address antara 2 sampai 254
Konfigurasi Server
1. Sistem Operasi
= OS Linux
2. Port proxy
= 3128
3. DNS server
= dengan domain www.sekolah.sch.id
4. Virtual directory
= dengan format : http:// www.sekolah.sch.id/~datasekolah
5. Domain baru
= dengan nama : http:// www.profilku.com
6. Web Server dan Ftp Server dengan benar
7. Proxy server
= dengan Blocking Site
: www.profilku.com

PEMBAHASAN SOAL UJI KOMPETENSI 2011-2012 | PAKET 2

Hal |2

Soal :

PC Client

DNS Server
Web Server
FTP Server

Switch

Implementasikan topologi diatas untuk melakukan pengujian fungsi Web Server, Ftp Server dan
DNS Server, dengan ketentuan :
a. Membuat perencanaan sesuai dengan topologi jaringan yang disediakan
b. Melakukan Perakitan PC Server dan Instalasi OS Linux
c. Instalasi PC Client (Windows XP) dan membuat website (www.sekolah.sch.id dan
www.profilku.com ) sesuai dengan aplikasi yang sudah ditentukan
d. Melakukan konfigurasi DNS Server, Ftp Server dan web Server
e. Melakukan instalasi implementasi sesuai topologi
f. Melakukan pengujian fungsi jaringan (sistem koneksi) dan pengujian aplikasi
server

JAWABAN :
1. IP Address :
Untuk IP Address ini harus dilakukan pada Interface. Sebagai langkah awal kita
setting Interface terlebih dahulu dengan mempersiapkan IP sesuai permintaan soal.
a. Login :
user@Server:~$whoami
user
user@Server#su
Password: (masukkan password root)
Server:/home/user#whoami
root
b. Setting Ethernet :
Server:/home/user#ifconfig
lo
Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:46 errors:0 dropped:0 overruns:0 frame:0
TX packets:46 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3036 (2.9 KiB) TX bytes:3036 (2.9 KiB)

PEMBAHASAN SOAL UJI KOMPETENSI 2011-2012 | PAKET 2

Hal |3

Sebelumnya harus kita hitung terlebih dahulu IP Address, Netmask, Network,


Broadcast dan Host sebagai berikut :
Server:/home/user# apt-cdrom add
Server:/home/user# apt-get install ipcalc
Server:/home/user# ipcalc 192.168.50.1/24
Address:
192.168.50.1
11000000.10101000.00110010. 00000001
Netmask: 255.255.255.0 = 24 11111111.11111111.11111111. 00000000
Wildcard: 0.0.0.255
00000000.00000000.00000000. 11111111
=>
Network: 192.168.50.0/24
11000000.10101000.00110010. 00000000
HostMin: 192.168.50.1
11000000.10101000.00110010. 00000001
HostMax: 192.168.50.254
11000000.10101000.00110010. 11111110
Broadcast: 192.168.50.255
11000000.10101000.00110010. 11111111
Hosts/Net: 254
Class C, Private Internet
Setelah itu kita isikan setting interface Ethernet sesuai dengan perhitungan diatas
untuk kedua interface eth0 dan eth1.
Server:/home/user# nano /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 10.1.1.1
netmask 255.255.255.0
network 10.1.1.0
broadcast 10.1.1.255

#boleh menggunakan IP yang lain.

auto eth1
iface eth1 inet static
address 192.168.50.1
netmask 255.255.255.0
network 192.168.50.0
Simpan dengan tekan tombol Ctrl+O dan tutup dengan Ctrl+X.

PEMBAHASAN SOAL UJI KOMPETENSI 2011-2012 | PAKET 2

Hal |4

Server:/home/user# /etc/init.d/networking restart


Server:/home/user# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:bc:48:12
inet addr:10.1.1.1 Bcast:10.1.1.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:febc:4812/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:460 errors:0 dropped:0 overruns:0 frame:0
TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:51679 (50.4 KiB) TX bytes:866 (866.0 B)
eth1

Link encap:Ethernet HWaddr 08:00:27:c0:de:2a


inet addr:192.168.50.1 Bcast:192.168.50.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fec0:de2a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:513 errors:0 dropped:0 overruns:0 frame:0
TX packets:336 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:50520 (49.3 KiB) TX bytes:48520 (47.3 KiB)

lo

Link encap:Local Loopback


inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:32 errors:0 dropped:0 overruns:0 frame:0
TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2304 (2.2 KiB) TX bytes:2304 (2.2 KiB)

Penjelasan :
- Eth0 digunakan untuk koneksi ke modem/internet/AP dengan IP 10.1.1.1
- Eth1 digunakan untuk www.sekolah.sch.id dengan IP 192.168.50.1 (LAN)

PEMBAHASAN SOAL UJI KOMPETENSI 2011-2012 | PAKET 2

Hal |5

c. Routing :
Server:/home/user# nano /etc/sysctl.conf
# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1
Server:/home/user# echo 1 > /proc/sys/net/ipv4/ip_forward
Server:/home/user# iptables -t nat -A POSTROUTING -j MASQUERADE
Server:/home/user# route
Kernel IP routing table
Destination Gateway
Genmask
Flags Metric Ref Use Iface
192.168.50.0
*
255.255.255.0
U
0
0 0 eth1
10.1.1.0
*
255.255.255.0
U
0
0 0 eth0
Server:/home/user# iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target prot opt source
destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source
destination
MASQUERADE all -- anywhere
anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source
destination
Simpan Routing agar diload setiap server diboot ulang :
Server:/home/user# nano /etc/rc.local
#...
# By default this script does nothing.
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -j MASQUERADE
exit 0
d. Install dan Setting DHCP Server :
Server:/home/user# apt-get install dhcp3-server
Jika ada pesan Otorisasi tekan OK.

PEMBAHASAN SOAL UJI KOMPETENSI 2011-2012 | PAKET 2

Hal |6

Server:/home/user# nano /etc/dhcp3/dhcpd.conf


Pada baris ke 51 (tekan Ctrl+C) ubah teks menjadi :
# A slightly different configuration for an internal subnet.
subnet 192.168.50.0 netmask 255.255.255.0 {
range 192.168.50.2 192.168.50.254;
option domain-name-servers 192.168.50.1;
option domain-name "sekolah.sch.id";
option routers 192.168.50.1;
option broadcast-address 192.168.50.255;
default-lease-time 600;
max-lease-time 7200;
}
Server:/home/user# nano /etc/default/dhcp3-server
# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
#
Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES="eth1"
Server:/home/user# /etc/init.d/dhcp3-server restart
e. Setting PC Client menggunakan IP Otomatis (contoh menggunakan Windows 7):

Pilih Icon Network pada Taskbar => Klik Open Network and Sharing Center

PEMBAHASAN SOAL UJI KOMPETENSI 2011-2012 | PAKET 2

Hal |7

Klik Local Area Connection

PEMBAHASAN SOAL UJI KOMPETENSI 2011-2012 | PAKET 2

Hal |8

Klik Properties

PEMBAHASAN SOAL UJI KOMPETENSI 2011-2012 | PAKET 2

Hal |9

Double Klik Internet Protocol Version 4 (TCP/IPv4)

Pastikan kedua pilihan ini yang aktif.

Selanjutnya aktifkan Command Prompt dari Start Menu Windows.

PEMBAHASAN SOAL UJI KOMPETENSI 2011-2012 | PAKET 2

H a l | 10

Hasil Ping ke Server dari Client.


2. SQUID
Server:/home/user# apt-get install squid
Server:/home/user# cd /etc/squid/
Server:/etc/squid# cp squid.conf squid.conf.backup
Server:/etc/squid# nano squid.conf
Cari baris berikut dan edit :
#...
# Squid normally listens to port 3128
http_port 3128 transparent
#...
cache_mem 32 MB
cache_mgr nama_siswa@sekolah.sch.id
#...
visible_hostname www.sekolah.sch.id
#...
acl blokir dstdomain "/etc/squid/blokir.txt"
acl key url_regex -i "/etc/squid/key.txt"
http_access deny blokir
http_access deny key
acl lan src 192.168.50.0/24
http_access allow lan
http_access allow all

PEMBAHASAN SOAL UJI KOMPETENSI 2011-2012 | PAKET 2

H a l | 11

Edit file blokir.txt dan key.txt


Server:/etc/squid# nano blokir.txt
.profilku.com
Server:/etc/squid# nano key.txt
porno
sex
Server:/etc/squid# iptables -t nat -A PREROUTING -p tcp --dport 80 -i eth1 -j REDIRECT
--to-port 3128
tambahkan dalam rc.local :
Server:/home/user# nano /etc/rc.local
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -j MASQUERADE
iptables -t nat -A PREROUTING -p tcp --dport 80 -i eth1 -j REDIRECT --to-port 3128
exit 0
Server:/etc/squid# /etc/init.d/squid restart
3. Test hasil konfigurasi
Buka browser (Firefox, IE, Opera, Safari) :

PEMBAHASAN SOAL UJI KOMPETENSI 2011-2012 | PAKET 2

H a l | 12

http://profilku.com atau http://www.profilku.com


4. DNS Server
Untuk install DNS menggunakan bind :
Server:/home/user# apt-get install bind9
Berikut file-file penting yang akan kita konfigurasi dalam DNS Server;
a. /etc/bind/named.conf
b. file forward
c. file reverse
d. /etc/resolv.conf
Server:/home/user# cd /etc/bind
Server:/etc/bind# nano named.conf
Tambahkan script kode berikut :
#...
zone "sekolah.sch.id" {
type master;
file "/etc/bind/sekolah.db";
};
zone "profilku.com" {
type master;
file "/etc/bind/profilku.db";
};
zone "50.168.192.in-addr.arpa" {
type master;
file "/etc/bind/192.db";
};
Server:/etc/bind# cp db.local sekolah.db
Server:/etc/bind# cp db.local profilku.db

PEMBAHASAN SOAL UJI KOMPETENSI 2011-2012 | PAKET 2

H a l | 13

Server:/etc/bind# nano sekolah.db


;
; BIND data file for local loopback interface
;
$TTL 604800
@
IN SOA
sekolah.sch.id. namasiswa.sekolah.sch.id. (
2
; Serial
604800
; Refresh
86400
; Retry
2419200
; Expire
604800 ) ; Negative Cache TTL
;
@
IN
NS
sekolah.sch.id.
@
IN
A
192.168.50.1
www IN
A
192.168.50.1
ftp IN
A
192.168.50.1
Server:/etc/bind# nano profilku.db
;
; BIND data file for local loopback interface
;
$TTL 604800
sekolah.sch.id.
IN SOA profilku.com. namasiswa.profilku.com. (
2
; Serial
604800
; Refresh
86400
; Retry
2419200
; Expire
604800 ) ; Negative Cache TTL
;
@
IN NS profilku.com.
@
IN A
192.168.50.1
www IN CNAME profilku.com.

PEMBAHASAN SOAL UJI KOMPETENSI 2011-2012 | PAKET 2

H a l | 14

Server:/etc/bind# cp db.127 192.db


;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@
IN SOA sekolah.sch.id. namasiswa.sekolah.sch.id. (
1
; Serial
604800
; Refresh
86400
; Retry
2419200
; Expire
604800 ) ; Negative Cache TTL
;
@
IN
NS
sekolah.sch.id.
1
IN
PTR sekolah.sch.id.
Server:/etc/bind# /etc/init.d/bind9 restart
Server:/etc/bind# nslookup sekolah.sch.id
Server:
Address:

127.0.0.1
127.0.0.1#53

Name:
Address:

www.sekolah.sch.id
192.168.50.1

Untuk merubah Server menjadi 192.168.50.1 edit file resolve.conf :


Server:/etc/bind# nano /etc/resolv.conf
nameserver 192.168.50.1
Server:/etc/bind# nslookup sekolah.sch.id
Server:
192.168.50.1
Address:
192.168.50.1#53
Name:
Address:

www.sekolah.sch.id
192.168.50.1

Server:/etc/bind# nslookup profilku.com


Server:
192.168.50.1
Address:
192.168.50.1#53
Name:
Address:

profilku.com
192.168.50.1

PEMBAHASAN SOAL UJI KOMPETENSI 2011-2012 | PAKET 2

H a l | 15

5. Instalasi Web Server Apache


Server:/etc/skel# apt-get install apache2 php5 php5-cli php5-common links2
Server:/etc/bind# cd /var/www/
Server:/var/www# nano info.php
<?php
phpinfo();
?>
Untuk mengujinya (Server Debian) :
Server:/var/www# links2 sekolah.sch.id
Server:/var/www# links2 sekolah.sch.id/info.php
Client Windows/Linux (Browser Firefox/Opera/Chrome) :

http://www.sekolah.sch.id

PEMBAHASAN SOAL UJI KOMPETENSI 2011-2012 | PAKET 2

H a l | 16

http://www.sekolah.sch.id/info.php
Untuk mengaktifkan domain tambahan :
Server:/home/user# cd /etc/apache2/sites-available/
Server:/etc/apache2/sites-available# nano profilku
<VirtualHost *:80>
ServerAdmin nama_siswa@localhost
ServerName www.profilku.com
ServerAlias profilku.com
DocumentRoot /var/www/profilku.com/
</VirtualHost>
Server:/etc/apache2/sites-available# cd /var/www/
Buat direktori virtual :
Server:/var/www# mkdir profilku.com
Server:/var/www# mkdir ~datasekolah

PEMBAHASAN SOAL UJI KOMPETENSI 2011-2012 | PAKET 2

H a l | 17

Buat file html untuk direktori virtual :


Server:/var/www# nano profilku.com/index.html
<html>
<body>
<center><h1>Ini adalah halaman situs http://www.profilku.com</h1>
<hr>
</center>
</body>
</html>
Server:/var/www# nano ~datasekolah/index.html
<html>
<body>
<center><h1>Ini adalah halaman situs http://www.sekolah.sch.id/~datasekolah</h1>
<hr>
</center>
</body>
</html>
Server:/etc/apache2/sites-available# a2ensite profilku
Server:/var/www# /etc/init.d/apache2 restart
Untuk mencoba domain www.profilku.com jangan lupa membuka perintah blokir di
squid, caranya sebagai berikut :
Server:/var/www# nano /etc/squid/squid.conf
#acl blokir dstdomain "/etc/squid/blokir.txt"
acl key url_regex -i "/etc/squid/key.txt"
#http_access deny blokir
http_access deny key
acl lan src 192.168.50.0/24
http_access allow lan
http_access allow all
Server:/var/www# /etc/init.d/squid restart

PEMBAHASAN SOAL UJI KOMPETENSI 2011-2012 | PAKET 2

H a l | 18

Gunakan browser (Firefox/Opera/IE/Chrome/Safari) :

http://sekolah.sch.id/~datasekolah

http://www.profilku.com
PEMBAHASAN SOAL UJI KOMPETENSI 2011-2012 | PAKET 2

H a l | 19

6. FTP Server
Install aplikasi ProFTPd terlebih dahulu, kemudian muncul menu PopUp dan pilih
standalone mode.
Server:/home/user# apt-get install proftpd
Selanjutnya, buat folder untuk meletakan semua file dan data pada ftp server.
Kemudian tambahkan hak akses untuk user ftp pada direktori tersebut.
Server:/home/user# mkdir share
Server:/home/user# userdel ftp
Server:/home/user# useradd -d /share/ ftp
Server:/home/user# passwd ftp
Enter new UNIX password:
Retype new UNIX password:
Buat beberapa folder sebagai bahan pengujian :
Server:/home/user# cd share/
Server:/home/user/share# mkdir bahan ftp server
Server:/home/user/share# ls
bahan ftp server
Server:/home/user/share# nano /etc/proftpd/proftpd.conf
ServerName
"ftp.sekolah.sch.id" # Di edit
#...
<Anonymous /home/user/share/>
#Tambahkan dibaris paling akhir
User
ftp
UserAlias
anonymous
ftp
</Anonymous>
Server:/home/user/share# /etc/init.d/proftpd restart

PEMBAHASAN SOAL UJI KOMPETENSI 2011-2012 | PAKET 2

H a l | 20

Uji coba dengan menggunakan Browser (Firefox/Opera/IE/Chrome/Safari) :

ftp://ftp.sekolah.sch.id

Demikian, semoga bermanfaat. Untuk informasi lebih lanjut silahkan hubungi Amroe
(087748944555 atau 081370489868)
Wasalam,

M. Amroe Oemar M.
Support Media Tunas Pelita

PEMBAHASAN SOAL UJI KOMPETENSI 2011-2012 | PAKET 2

Anda mungkin juga menyukai