welcome
Sabtu, 10 Juni 2017
Minggu, 07 Mei 2017
Redhat 9.0
A.
INSTALASI DNS Server pada Redhat 9.0
1. Instalasi DNS Server dengan terminal
– Masukkan cd 1 dari
installer Redhat 9.0
– Kemudian Aktifkan cdrom dgn perintah :
[root@localhost /]# mount /dev/cdrom
/mnt/cdrom
– Buat folder rpm (untuk tempat menyimpan file instalasi DNS server (bind)
[root@localhost
root]# cd /
[root@localhost root]# mkdir rpm
[root@localhost root]# ls
bin dev
home lib
misc opt root tftpboot usr boot
etc initrd lost+found mnt proc rpm
sbin tmp var
– Copy semua file bind
ke folder rpm yang di buat tadi dgn perintah
[root@localhost
root]# cp /mnt/cdrom/RedHat/RPMS/bind-*.rpm /rpm/
[root@localhost
root]# cd /rpm
[root@localhost
rpm]# ls
bind-9.2.1-16.i386.rpm
bind-utils-9.2.1-16.i386.rpm
Terlihat dua file bind yang telah
tercopy ke folder rpm yaitu bind-9 dan bind-untils
– nonaktifkan cdrom dgn
perintah
[root@localhost
/]# umount /dev/cdrom /mnt/cdrom
– lalu keluarkan cd 1
kemudian masukkan disk 2 dari disk instalasi Linux Redhat 9
– lakukan mounting untuk mengaktifkan cd instalasi
– lakukan mounting untuk mengaktifkan cd instalasi
[root@localhost
/]# mount /dev/cdrom /mnt/cdrom
mount: block device /dev/cdrom is
write-protected, mounting read-only
[root@localhost /]#
[root@localhost /]#
– lalu copy file bind-devel
dan caching-namesserver ke folder rpm dgn perintah :
[root@localhost
/]# cp /mnt/cdrom/RedHat/RPMS/bind-devel-9.2.1-16.i386.rpm /rpm/
[root@localhost /]# cp /mnt/cdrom/RedHat/RPMS/caching-nameserver-7.2-7.noarch.rpm
/rpm/
[root@localhost /]# cd /rpm
[root@localhost /]# cd /rpm
[root@localhost
/]# ls
bind-9.2.1-16.i386.rpm
bind-utils-9.2.1-16.i386.rpm
bind-devel-9.2.1-16.i386.rpm
caching-nameserver-7.2-7.noarch.rpm
Dari tampilan diatas terlihat 4 file
aplikasi telah di copy ke folder rpm
– lakukan
penginstallan semua aplikasi tersebut dgn perintah :
[root@localhost
rpm]# rpm -ivh bind-*.rpm caching-nameserver-7.2-7.noarch.rpm
warning: bind-9.2.1-16.i386.rpm: V3
DSA signature: NOKEY, key ID db42a60e
Preparing… ################################### [100%]
1:bind-utils ################################### [ 25%]
2:bind ################################### [ 50%]
3:bind-devel ################################### [ 75%]
4:caching-nameserver ################################### [100%]
Preparing… ################################### [100%]
1:bind-utils ################################### [ 25%]
2:bind ################################### [ 50%]
3:bind-devel ################################### [ 75%]
4:caching-nameserver ################################### [100%]
[root@localhost
/]#
– Lakukan
pengecekan hasil instalasi
[root@localhost
/]# rpm -qa |grep bind
bind-utils-9.2.1-16
bind-devel-9.2.1-16
ypbind-1.11-4
bind-9.2.1-16
caching-nameserver
[root@localhost /]#
bind-devel-9.2.1-16
ypbind-1.11-4
bind-9.2.1-16
caching-nameserver
[root@localhost /]#
2. Instalasi DNS Server dgn GUI
– Ikuti petunjuk Gambar
– Pilih (System
Settings – Add\Remove Applications) maka akan muncul
– Tunggulah beberapa
saat hingga muncul Add or Remove Packages
– Lalu centeng pada Server Configuration Tools lalu Click Details
– Lalu centeng pada Server Configuration Tools lalu Click Details
– kemudian centeng lagi Redhat-Config
Bind lalu click close
– Kemudian centeng lagi DNS
Name Server
– Kemudian Click
update untuk memilai penginstalan
– Pilih Continue
– Masukkan cd 1 sesuai perintah (cd
installer Redhat 9)
-Tunggu beberapa saat
– Masukkan cd 2 sesuai
perintah (cd installer Redhat 9)
– Click Ok untuk mengakhiri proses
instalasi Bind
– Informasi Bahwa
Instalasi telah berhasil dan Complete
– Untuk memastikan kembali keberhasilan instalsi Bind server dgn perintah :
[root@localhost
/]# rpm -qa |grep bind
bind-utils-9.2.1-16
bind-devel-9.2.1-16
ypbind-1.11-4
bind-9.2.1-16
[root@localhost /]#
Apabila hasil pengecekan sesuai dgn
diatas maka instalasi telah berhasil.
B.
KONFIGURASI DNS Server
– Pertama-tama
lakukan konfigurasi file hosts
[root@localhost
/]# vi /etc/hosts
Untuk memulai editing lakukan
penekanan tombol keyboard INSERT Sisipkan tulisan yang berwarnah merah
sebagai konfigurasi tambahan Simpan file dengan menekan tombol escape/Esc
kemudian ketik :wq kemudian tekan enter
– lalu lakukan editing
pada file /etc/host.conf
[root@localhost
/]# vi /etc/host.conf
isi file sesuai data di bawah ini :
order bind,hosts
[root@localhost
/]# vi /etc/named.conf
– lalu edit file utama
konfigurasi DNS Server yaitu named.conf tepatnya di /etc/named.conf dgn
menyisipkan tulisan yg berfont tebal dibawah ini.
[root@localhost
/]# vi /etc/named.conf
// generated by named-bootconf.pl options
{
directory “/var/named”;
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};
//
// a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone “.” IN {
type hint;
file “named.ca”;
};
directory “/var/named”;
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};
//
// a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone “.” IN {
type hint;
file “named.ca”;
};
zone “localhost” IN {
type master;
file “localhost.zone”;
allow-update { none; };
};
type master;
file “localhost.zone”;
allow-update { none; };
};
zone “0.0.127.in-addr.arpa” IN {
type master;
file “named.local”;
allow-update { none; };
};
type master;
file “named.local”;
allow-update { none; };
};
zone
“smkdmi.sch.id” {
type master;
file “smkdmi.zone”;
};
type master;
file “smkdmi.zone”;
};
zone
“1.168.192.in-addr.arpa” {
type master;
file “smkdmi.ip”;
};
type master;
file “smkdmi.ip”;
};
include “/etc/rndc.key”;
Untuk memulai editing lakukan penekanan
tombol keyboard INSERT
Sisipkan tulisan yang berwarnah merah sebagai konfigurasi tambahan
Simpan file dengan menekan tombol escape/Esc kemudian ketik :wq kemudian tekan enter
Sisipkan tulisan yang berwarnah merah sebagai konfigurasi tambahan
Simpan file dengan menekan tombol escape/Esc kemudian ketik :wq kemudian tekan enter
– Buat file
smkdmi.zone
– Lalu isi dng scripts dibawah ini :
– Lalu isi dng scripts dibawah ini :
$TTL
86400
@ IN SOA ns.smkdmi.sch.id. root.smkdmi.sch.id. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS ns.smkdmi.sch.id.
IN MX 0 ns.smkdmi.sch.id.
IN A 192.168.1.10
ns IN A 192.168.1.10
mail IN A 192.168.1.10
www IN A 192.168.1.10
ftp IN A 192.168.1.10
@ IN SOA ns.smkdmi.sch.id. root.smkdmi.sch.id. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS ns.smkdmi.sch.id.
IN MX 0 ns.smkdmi.sch.id.
IN A 192.168.1.10
ns IN A 192.168.1.10
mail IN A 192.168.1.10
www IN A 192.168.1.10
ftp IN A 192.168.1.10
– Buat file smkdmi.arpa.zone
– Lalu isi dng scripts dibawah ini :
– Lalu isi dng scripts dibawah ini :
$TTL
86400
@ IN SOA ns.smkdmi.sch.id. root.smkdmi.sch.id. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
@ IN SOA ns.smkdmi.sch.id. root.smkdmi.sch.id. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN
NS ns.smkdmi.sch.id.
10 IN PTR ns.smkdmi.sch.id.
10 IN PTR ns.smkdmi.sch.id.
– Lalu edit file
resolv.conf di /etc/reslov.conf (edit dns linux)
[root@localhost
/]# vi /etc/resolv.conf
– Lalu isi dng scripts dibawah ini :
– Lalu isi dng scripts dibawah ini :
search smkdmi.sch.id
nameserver 192.168.1.10
nameserver 192.168.1.10
– Restart network
[root@localhost
/]# service network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Setting network parameters: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
[root@localhost /]#
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Setting network parameters: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
[root@localhost /]#
– Restart bind
[root@localhost
/]# /etc/init.d/named restart
Stopping named: rndc: connect failed: connection refused [FAILED]
[root@localhost /]# [ OK ]
[root@localhost /]#
Stopping named: rndc: connect failed: connection refused [FAILED]
[root@localhost /]# [ OK ]
[root@localhost /]#
– Aktifkan service named
ketika pc on
[root@localhost
/]# chkconfig named on
– Setelah konfigurasi
diatas lakukanlah restart pada Pc Linux
– kemudian lakukan
restart named
[root@ns
/]# /etc/init.d/named restart
– jika anda ada
melakukan perubahan konfigurasi file DNS Server pastikan juga anda melakukan
perintah berikut :
[root@ns
/]# rndc reload
– Terakhir lakukan
pengecekan DNS Server
[root@ns
/]# nslookup smkdmi.sch.id
Note: nslookup is deprecated
and may be removed from future releases.
Consider using the `dig’ or `host’ programs instead. Run nslookup with
the `-sil[ent]’ option to prevent this message from appearing.
Server: 192.168.1.10
Address: 192.168.1.10#53
Name: smkdmi.sch.id
Address: 192.168.1.10
Consider using the `dig’ or `host’ programs instead. Run nslookup with
the `-sil[ent]’ option to prevent this message from appearing.
Server: 192.168.1.10
Address: 192.168.1.10#53
Name: smkdmi.sch.id
Address: 192.168.1.10
[root@ns
/]# ping
PING (192.168.1.10) 56(84) bytes of data.
64 bytes from ns.smkdmi.sch.id (192.168.1.10): icmp_seq=1 ttl=64 time=0.084 ms
64 bytes from ns.smkdmi.sch.id (192.168.1.10): icmp_seq=2 ttl=64 time=0.117 ms
64 bytes from ns.smkdmi.sch.id (192.168.1.10): icmp_seq=3 ttl=64 time=0.186 ms
— ping statistics —
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.084/0.129/0.186/0.042 ms
PING (192.168.1.10) 56(84) bytes of data.
64 bytes from ns.smkdmi.sch.id (192.168.1.10): icmp_seq=1 ttl=64 time=0.084 ms
64 bytes from ns.smkdmi.sch.id (192.168.1.10): icmp_seq=2 ttl=64 time=0.117 ms
64 bytes from ns.smkdmi.sch.id (192.168.1.10): icmp_seq=3 ttl=64 time=0.186 ms
— ping statistics —
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.084/0.129/0.186/0.042 ms
[root@ns
/]# host
has address 192.168.1.10
root@localhost /]# host
has address 192.168.1.10
[root@localhost /]#
has address 192.168.1.10
root@localhost /]# host
has address 192.168.1.10
[root@localhost /]#
– lakukan
pengujian DNS Server dengan perintah
[root@ns
/]# nslookup
Note: nslookup is deprecated and may be removed from future releases.
Consider using the `dig’ or `host’ programs instead. Run nslookup with
the `-sil[ent]’ option to prevent this message from appearing.
Server: 192.168.1.10
Address: 192.168.1.10#53
Name:
Address: 192.168.1.10
Note: nslookup is deprecated and may be removed from future releases.
Consider using the `dig’ or `host’ programs instead. Run nslookup with
the `-sil[ent]’ option to prevent this message from appearing.
Server: 192.168.1.10
Address: 192.168.1.10#53
Name:
Address: 192.168.1.10
[root@ns/]#
nslookup ftp.smkdmi.sch.id
Note: nslookup is deprecated and may be removed from future releases.
Consider using the `dig’ or `host’ programs instead. Run nslookup with
the `-sil[ent]’ option to prevent this message from appearing.
Server: 192.168.1.10
Address: 192.168.1.10#53
Name: ftp.smkdmi.sch.id
Address: 192.168.1.10
Note: nslookup is deprecated and may be removed from future releases.
Consider using the `dig’ or `host’ programs instead. Run nslookup with
the `-sil[ent]’ option to prevent this message from appearing.
Server: 192.168.1.10
Address: 192.168.1.10#53
Name: ftp.smkdmi.sch.id
Address: 192.168.1.10
[root@ns
/]# nslookup ssh.smkdmi.sch.id
Note: nslookup is deprecated and may be removed from future releases.
Consider using the `dig’ or `host’ programs instead. Run nslookup with
the `-sil[ent]’ option to prevent this message from appearing.
Server: 192.168.1.10
Address: 192.168.1.10#53
Name: ssh.smkdmi.sch.id
Address: 192.168.1.10
Note: nslookup is deprecated and may be removed from future releases.
Consider using the `dig’ or `host’ programs instead. Run nslookup with
the `-sil[ent]’ option to prevent this message from appearing.
Server: 192.168.1.10
Address: 192.168.1.10#53
Name: ssh.smkdmi.sch.id
Address: 192.168.1.10
B. Konfigurasi Client
Windows
Agar Konfigurasi DNS server di
kenali oleh Client Windows maka harus dilakukan beberapa konfigurasi. Jika tapi
jika windows belum di konfigurasi maka akan tampil sebagai berikut :
– jika dilakukan ping
smkdmi.sch.id dari Command Prompt maka akan tampil sebagai berikut :
– jika dilakukan
perintah nslookup smkdmi.sch.id dari Command Prompt maka akan tampil
sebagai berikut :
Agar DNS Server di kenali maka ada
beberapa setting tambahan di Client Windows yaitu pada seting DNS dimasukkan IP
Linux kita dalam konfigurasi ini yaitu 192.168.1.10 seperti tampilan berikut :
Jika setting DNS pada windows sudah
di isi Ip Linux dalam konfigurasi modul ini yaitu 192.168.1.10 atau seperti
gambar diatas, maka efek dari setting ini adalah :
– jika dilakukan ping
smkdmi.sch.id dari Command Prompt maka akan tampil sebagai berikut :
– jika dilakukan
perintah nslookup smkdmi.sch.id dari Command Prompt maka akan tampil
sebagai berikut :
Minggu, 30 April 2017
TUGAS PROGRAM JARINGAN 1
LISTING PROGRAM
LOGIKA PROGRAM
Program diatas membahas tentang program pengambilan IP Address, program diatas menggunakan package import.java.net dengan nama kelasnya adalah getIP, nama kelas disini harus sama dengan nama file yang akan disimpan, sehingga saat proses compile program java sudah mengetahui file yang dimaksud. Potongan program diatas deklarasikan variabel host dengan nilainya null, kemudian variabel host akan mengambil nilai IP dengan perintah .getLocalHost(); kemudian variabel ip yang merupakan variabel array dia akan menyimpan nilai si variabel host. Maka ketika program di jalankan maka akan muncul Ip Address local yang diberikan oleh ISP atau Ip Address yang dibuat sendiri .
OUTPUT PROGRAM
GET NAME
LISTING PROGRAM
LOGIKA PROGRAM
Program diatas membahas tentang program pengambilan nama si user, program diatas menggunakan package import.java.net dengan nama kelasnya adalah getName, nama kelas disini harus sama dengan nama file yang akan disimpan, sehingga saat proses compile program java sudah mengetahui file yang dimaksud. Potongan program diatas deklarasikan variabel host dengan nilainya null, kemudian variabel host akan mengambil nilai IP dengan perintah .getLocalHost();. Maka ketika program di jalankan maka akan muncul Nama user yang sesuai dengan localhostnya.
OUTPUT PROGRAM
IP to NAME
LISTING PROGRAM
LOGIKA PROGRAM
Program diatas menjelaskan package import java.net.*; paket ini berisi kelas yang memperbolehkan program berkomunikasi melewati jaringan. Kemudian terdapat kondisi dimana variabel args akan mengesekusi panjang String host dengan nilai sama dengan 0. Jika kondisi benar maka akan mencetak nama pemakai dan ip addressnya. Kemudian program masuk ke kondisi try-catch dimana program akan mengecek terjadinya kesalahan jika terjadi kesalahan maka program akan memberikan output kesalahan berupa akan muncul invalid IP – malformed IP.
OUTPUT PROGRAM
NSLOOKUP
LISTING PROGRAM
Potongan program diatas menjelaskan tentang package import java.net.*; paket ini berisi kelas yang memperbolehkan program berkomunikasi melewati jaringan. Kemudian terdapat kondisi variabel args akan mengesekusi panjang String host yang bernilai sama dengan 0. Jika kondisi benar maka akan mencetak ip addressnya. Setelah itu program melakukan eksekusi try catch untuk mengecek jika terdapat kesalahan pada program. Jika terjadi kesalahan maka akan muncul invalid IP – malformed IP.
OUTPUT PROGRAM
SIMPLE SERVER (APLIKASI CLIENT)
LISTING PROGRAM simpleClient
import java.io.*;
import java.net.*;
publicclass simpleClient {
publicfinalstaticint REMOTE_PORT =5000;
publicstaticvoid main(String args[])throws Exception {
Socket cl =null;
BufferedReader is =null;
DataOutputStream os =null;
BufferedReader stdin =new BufferedReader(new
InputStreamReader(System.in));
String userInput =null;
String output =null;
// Membuka koneksi ke server pada port REMOTE_PORT
try{
cl =new Socket(args[0], REMOTE_PORT);
is =new BufferedReader(new
InputStreamReader(cl.getInputStream()));
os =new DataOutputStream(cl.getOutputStream());
}catch(UnknownHostException e1){
System.out.println("Unknown Host: "+ e1);
}catch(IOException e2){
System.out.println("Erorr io: "+ e2);
}
// Menulis ke server
try{
System.out.print("Masukkan kata kunci: ");
userInput = stdin.readLine();
os.writeBytes(userInput +"\n");
}catch(IOException ex){
System.out.println("Error writing to server..."+ ex);
}
// Menerima tanggapan dari server
try{
output = is.readLine();
System.out.println("Dari server: "+ output);
}catch(IOException e){
e.printStackTrace();
}
// close input stream, output stream dan koneksi
try{
is.close();
os.close();
cl.close();
}catch(IOException x){
System.out.println("Error writing...."+ x);
}
}
}
LOGIKA PROGRAM simpleClient
Potongan program diatas menjelaskan tentang program client dengan package java.io merupakan singkatan dari Input Output dan program mengimport java. Net.* paket ini berisi kelas yang memperbolehkan program untuk berkomunikasi melalui jaringan pada sisi server.
Program client akan jalan jika programserver sudah dirunning terlebih dahulu. Setelah server sudah jalan maka client bisa mengirim pesan ‘salam’. Jika tidak akan muncul tulisan aplikasi server hidup.
LISTING PROGRAM simpleServer
import java.io.*;
import java.net.*;
publicclass simpleServer {
publicfinalstaticint TESTPORT =5000;
publicstaticvoid main(String args[]){
ServerSocket checkServer =null;
String line;
BufferedReader is =null;
DataOutputStream os =null;
Socket clientSocket =null;
try{
checkServer =new ServerSocket(TESTPORT);
System.out.println("Aplikasi Server hidup ...");
}catch(IOException e){
System.out.println(e);
}
try{
clientSocket = checkServer.accept();
is =new BufferedReader(new
InputStreamReader(clientSocket.getInputStream()));
os =new DataOutputStream(clientSocket.getOutputStream());
}catch(Exception ei){
ei.printStackTrace();
}
try{
line = is.readLine();
System.out.println("Terima : "+ line);
if(line.compareTo("salam")==0){
os.writeBytes("salam juga");
}else{
os.writeBytes("Maaf, saya tidak mengerti");
}
}catch(IOException e){
System.out.println(e);
}
try{
os.close();
is.close();
clientSocket.close();
}catch(IOException ic){
ic.printStackTrace();
}
}
}
LOGIKA PROGRAM simpleServer
Program diatas menjelaskan tentang program server dengan mengimport java. io merupakan singkatan dari Input Output dan program mengimport java. Net.* paket ini berisi kelas yang memperbolehkan program untuk berkomunikasi melalui jaringan pada sisi server. Jika eksekusi try-catch dapat dijalankan dengan benar maka program ini akan menghidupkan aplikasi servernya, program ini akan mencari kata-kata ‘salam’ sebagai kata kuncinya.
OUTPUT PROGRAM
Sabtu, 29 April 2017
Langganan:
Komentar (Atom)
















