Tampilkan postingan dengan label tugas jarkom teori (24 nov'08). Tampilkan semua postingan
Tampilkan postingan dengan label tugas jarkom teori (24 nov'08). Tampilkan semua postingan

Minggu, November 30

setting DNS server

Di sela-sela kuliah,tugas yang datang silih berganti n bertumpuk-tumpuk..kita harus selalu SEMANGAT. kalaupun ada kesulitan,pasti ada aja pertolongan dari ALLAH SWT. ok,kali ini makul jarkom da tugas lagi,about setting DNS server...(DNS? kenalan ma DNS yuuk...!)

------------------------------------------------------

Langkah-langkah setting DNS menggunakan bind9

1. Install bind9

root@mynido-desktop:/home/mynido/bind9# dpkg -i bind9_9.4.1-P1-3ubuntu2_i386.deb
Selecting previously deselected package bind9.
(Reading database ... 89207 files and directories currently installed.)
Unpacking bind9 (from bind9_9.4.1-P1-3ubuntu2_i386.deb) ...
dpkg: dependency problems prevent configuration of bind9:
bind9 depends on libdns32 (= 1:9.4.1-P1-3ubuntu2); however:
Version of libdns32 on system is 1:9.4.1-P1-3.
bind9 depends on libisccfg30 (= 1:9.4.1-P1-3ubuntu2); however:
Version of libisccfg30 on system is 1:9.4.1-P1-3.
bind9 depends on libisc32 (= 1:9.4.1-P1-3ubuntu2); however:
Version of libisc32 on system is 1:9.4.1-P1-3.
bind9 depends on libisccc30 (= 1:9.4.1-P1-3ubuntu2); however:
Version of libisccc30 on system is 1:9.4.1-P1-3.
dpkg: error processing bind9 (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
bind9

Ternyata masih memerlukan file dependensi : libdns32, libisccfg30, libisc32, libisccc30. Cari di internet, download. Pastikan file dependensi tersebut untuk Ubuntu Gutsy Gibbon. Install file dependensi tersebut.

root@mynido-desktop:/home/mynido/bind9# dpkg -i libdns32_9.4.1-P1-3ubuntu2_i386.deb; dpkg -i libisccfg30_9.4.1-P1-3ubuntu2_i386.deb; dpkg -i libisc32_9.4.1-P1-3ubuntu2_i386.deb; dpkg -i libisccc30_9.4.1-P1-3ubuntu2_i386.deb
(Reading database ... 89247 files and directories currently installed.)
Preparing to replace libdns32 1:9.4.1-P1-3 (using libdns32_9.4.1-P1-3ubuntu2_i386.deb) ...
Unpacking replacement libdns32 ...
Setting up libdns32 (1:9.4.1-P1-3ubuntu2) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place
(Reading database ... 89247 files and directories currently installed.)
Preparing to replace libisccfg30 1:9.4.1-P1-3 (using libisccfg30_9.4.1-P1-3ubuntu2_i386.deb) ...
Unpacking replacement libisccfg30 ...
Setting up libisccfg30 (1:9.4.1-P1-3ubuntu2) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place
(Reading database ... 89247 files and directories currently installed.)
Preparing to replace libisc32 1:9.4.1-P1-3 (using libisc32_9.4.1-P1-3ubuntu2_i386.deb) ...
Unpacking replacement libisc32 ...
Setting up libisc32 (1:9.4.1-P1-3ubuntu2) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place
(Reading database ... 89247 files and directories currently installed.)
Preparing to replace libisccc30 1:9.4.1-P1-3 (using libisccc30_9.4.1-P1-3ubuntu2_i386.deb) ...
Unpacking replacement libisccc30 ...
Setting up libisccc30 (1:9.4.1-P1-3ubuntu2) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place

Proses installasi file dependensi selesai. Coba install lagi bind9

root@mynido-desktop:/home/mynido/bind9# dpkg -i bind9_9.4.1-P1-3ubuntu2_i386.deb
(Reading database ... 89247 files and directories currently installed.)
Preparing to replace bind9 1:9.4.1-P1-3ubuntu2 (using bind9_9.4.1-P1-3ubuntu2_i386.deb) ...
Unpacking replacement bind9 ...
Setting up bind9 (1:9.4.1-P1-3ubuntu2) ...
Adding group `bind' (GID 120) ...
Done.
Adding system user `bind' (UID 112) ...
Adding new user `bind' (UID 112) with group `bind' ...
Not creating home directory `/var/cache/bind'.
wrote key file "/etc/bind/rndc.key"
* Starting domain name service... bind [ OK ]
bind9 sudah diinstall.

Sudah terinstall. Kalau Anda punya repositorinya, bisa langsung pakai apt-get.

root@komputer16-desktop:/home/komputer16/bind9# apt-get install bind9

2. Pastikan bind9 sudah terinstall. Coba cek. Cuma untuk memastikan.

root@mynido-desktop:/home/mynido/bind9# dpkg -l | grep bind9
ii bind9 1:9.4.1-P1-3ubuntu2 Internet Domain Name Server
ii bind9-host 1:9.4.1-P1-3 Version of 'host' bundled with BIND 9.X
ii libbind9-30 1:9.4.1-P1-3 BIND9 Shared Library used by BIND

3. Edit file /etc/resolv.conf

root@mynido-desktop:/home/mynido/bind9# pico /etc/resolv.conf
domain nidykauman.com
search nidykauman.com
nameserver 192.168.1.16

4. Edit file /etc/bind/named.conf

root@mynido-desktop:/home/mynido/bind9# pico /etc/bind/named.conf
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local

include "/etc/bind/named.conf.options";

// prime the server with knowledge of the root servers
zone "." {
type hint;
file "/etc/bind/db.root";
};

// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912

zone "localhost" {
type master;
file "/etc/bind/db.local";
};

zone "127.in-addr.arpa" {
type master;
file "/etc/bind/db.127";
};

zone "0.in-addr.arpa" {
type master;
file "/etc/bind/db.0";
};

zone "255.in-addr.arpa" {
type master;
file "/etc/bind/db.255";
};

//tambahkan baris berikut
zone "enambelas.com" {
type master;
file "/etc/bind/db.nidykauman.com";
};

zone "1.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.192.168.1";
};

// zone "com" { type delegation-only; };
// zone "net" { type delegation-only; };

// From the release notes:
// Because many of our users are uncomfortable receiving undelegated answers
// from root or top level domains, other than a few for whom that behaviour
// has been trusted and expected for quite some length of time, we have now
// introduced the "root-delegations-only" feature which applies delegation-only
// logic to all top level domains, and to the root domain. An exception list
// should be specified, including "MUSEUM" and "DE", and any other top level
// domains from whom undelegated responses are expected and trusted.
include "/etc/bind/named.conf.local";

5. Buat file /etc/bind/db.nidykauman.com

root@mynido-desktop:/home/mynido/bind9# pico /etc/bind/db.nidykauman.com
$TTL 86400

@ IN SOA nidykauman.com. root.nidykauman.com. (
20081122 ;Serial
604800 ;Refresh
86400 ;Retry
2419200 ;Expire
604800 ) ; Negative Cache TTL

@ IN NS nidykauman.com.
@ IN A 192.168.1.16

6. Buat file /etc/bind/db.192.168.1

root@mynido-desktop:/home/mynido/bind9# pico /etc/bind/db.192.168.1
$TTL 86400

@ IN SOA nidykauman.com. root.nidykauman.com. (
20081122 ;Serial
604800 ;Refresh
86400 ;Retry
2419200 ;Expire
604800) ; Negative Cache TTL
;
IN NS nidykauman.com.
IN PTR www.nidykauman.com.

7. Cek apakah settingan file db.nidykauman.com sudah benar?

root@mynido-desktop:/home# named-checkzone nidykauman.com /etc/bind/db.nidykauman.com
zone enambelas.com/IN: loaded serial 20081122
OK

8. Cek apakah settingan file db.192.168.1 sudah benar?

root@nidykauman-desktop:/home# named-checkzone 192.168.1 /etc/bind/db.192.168.1
zone 192.168.1/IN: loaded serial 20081122
OK

9. Restart service DNS

root@mynido-desktop:/home/mynido/bind9# /etc/init.d/bind9 restart
* Stopping domain name service... bind [ OK ]
* Starting domain name service... bind [ OK ]

10. Sudah selesai, sekarang tes dengan perintah dig atau ping

root@mynido-desktop:/home/mynido/bind9# dig nidykauman.com

; <<>> DiG 9.4.1-P1 <<>> nidykauman.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59585
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;nidykauman.com. IN A

;; ANSWER SECTION:
nidykauman.com. 86400 IN A 192.168.1.16

;; AUTHORITY SECTION:
nidykauman.com. 86400 IN NS nidykauman.com.

;; Query time: 1 msec
;; SERVER: 192.168.1.16#53(192.168.1.16)
;; WHEN: Sat Nov 22 21:12:31 2008
;; MSG SIZE rcvd: 61

root@mynido-desktop:/home/mynido/bind9# ping nidykauman.com
PING enambelas.com (192.168.1.16) 56(84) bytes of data.
64 bytes from mynido-desktop.local (192.168.1.16): icmp_seq=1 ttl=64 time=0.016 ms
64 bytes from mynido-desktop.local (192.168.1.16): icmp_seq=2 ttl=64 time=0.024 ms

--- nidykauman.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3998ms
rtt min/avg/max/mdev = 0.016/0.023/0.028/0.006 ms
--------------------------------------------------------------------
yah....segini dulu,moga tugas ini bermanfaat..
thanks to mr.lecturer n assistant..... do your best always..!