1.Instal paketnya misalnya BIND9 atau BIND
# apt-get install bind9
2. Konfigurasi file named.conf setelah menginstal BIN9
# nano /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";
};
zone "tkjsmkn1bangil.com" {
type master;
file "/etc/bind/db.filesatu";
};
zone "3.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.filedua";
};
// 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.
// root-delegation-only exclude { "DE"; "MUSEUM"; };
include "/etc/bind/named.conf.local";
3.Buat filesatu dengan informasi berikut ini
# nano /etc/bind/db.filesatu disebut juga file(forward) bisa meng copy file localhost.
@ IN SOA tkjsmkn1bangil.com. root. tkjsmkn1bangil. (
0811200708 ;serial
5H ;refresh
5H ;retry
1M ;expired
1H );minimum
@ IN NS ns.tkjsmkn1bangil.com.
IN MX 1 mail.tkjsmkn1bangil.com.
dns IN A 192.168.3.61
www IN A 192.168.3.61
ftp IN A 192.168.3.61
mail IN A 192.168.3.61
ekstra IN A 192.168.3.61
4.Buat filedua dengan informasi berikut ini
# editor /etc/bind/db.filedua disebut juga file (reverse) bisa mengcopy file db.127
@ IN SOA tkjsmkn1bangil.com. root.tkjsmkn1bangil. (
0811200708 ;serial
5H ;refresh
5H ;retry
1M ;expired
1H );minimum
@ IN NS tkjsmkn1bangil.com.
61 IN PTR tkjsmkn1bangil.com.
61 IN PTR extra.tkjsmkn1bangil.com
5. Restart aplikasi binnya
# /etc/init.d/bind restart
6. Ujicoba hasil konfigurasi
# nslookup enter
>www.tkjsmkn1bangil.com enter
>192.168.3.61