Setting DNS Server
Setting DNS Server
#Kita Install paket
bind9 dengan perintah : apt-get install bind9
#Kemudian kita copy db.127 menjadi db.1 dan kita copy
db.local menjadi db.2 dengan perintah: #cp
/etc/bind/db.127 /etc/bind/db.1
#
cp /etc/bind/db.local /etc/bind/db.2
#Edit db.1
dengan perintah : mcedit /etc/bind/db.1
#Sesuaikan
script seperti dibawah ini :
;
; BIND reverse data
file for local loopback interface
;
$TTL 604800
@ IN SOA lksoki.com. root.lksoki.com. (
1 ;
Serial
604800 ;
Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ;
Negative Cache TTL
;
@ IN NS lksoki.com.
2.10.10 IN PTR lksoki.com.
#tekan F2 untuk
menympan dan F10 untuk keluar
#Edit db.2
dengan perintah : mcedit /etc/bind/db.2
#Sesuaikan
script seperti dibawah ini :
;
; BIND data file for local
loopback interface
;
$TTL 604800
@ IN SOA lksoki.com. root.lksoki.com. (
2 ;
Serial
604800 ;
Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ;
Negative Cache TTL
;
@ IN NS lksoki.com.
@ IN A 162.10.10.2
@ IN AAAA ::1
www IN A 162.10.10.2
ftp IN A 162.10.10.3
mail IN A 162.10.10.4
#tekan F2 untuk
menympan dan F10 untuk keluar
#Edit named.conf.default-zones dengan perintah
: mcedit named.conf.default-zones
#Sesuaikan
script seperti dibawah ini :
// 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
"lksoki.com" {
type master;
file "/etc/bind/db.2";
};
zone
"162.in-addr.arpa" {
type master;
file "/etc/bind/db.1";
};
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";
};
#tekan F2 untuk
menympan dan F10 untuk keluar
#Kemudian
di restart bind9 : /etc/init.d/bid9
restart
#Pastikan
juga di resolv.conf : mcedit /etc/resolv.conf
#Sesuaikan
konfigurasinya sbg berikut :
search lksoki.com
nameserver
162.10.10.2
nameserver
162.10.10.1
#tekan F2 untuk
menympan dan F10 untuk keluar
#
Untuk mengecek tulis perintah : nslookup
lksoki.com
Komentar
Posting Komentar