Feeds:
Pos
Komentar

Posts Tagged ‘named’

 

Search Engine Optimization and SEO Tools

Langsung saja :

# userdel -r named
# rm -rf /var/named

# wget ftp://ftp.isc.org/isc/bind9/9.2.2rc1/bind-9.2.2rc1.tar.gz
# tar -xzvf bind-9.2.2rc1.tar.gz
# cd bind-9.2.2rc1
# ./configure –prefix=/usr/local/named
# make
# make install
# adduser -d /var/named -s /bin/false named

# cd /var/named
# wget ftp://internic.net/domain/named.root
# vi db.127.0.0

isinya adalah :

$TTL 86400
@ IN SOA localhost. root.localhost. (
2003021500 ; serial
28800 ; refresh
14400 ; retry
3600000 ; expiry
86400 ) ; minimum

IN NS localhost.
1 IN PTR localhost.

# cp db.127.0.0 db.10.126.24
# vi db.localhost

isinya adalah :
$TTL 86400
$ORIGIN localhost.
@ IN SOA localhost. root.localhost. (
2003021500 ; serial
28800 ; refresh
14400 ; retry
3600000 ; expiry
86400 ) ; minimum

IN NS localhost.
IN A 127.0.0.1

# mkdir /usr/local/named/etc
# vi /usr/local/named/etc/named.conf

isinya adalah :

options {
directory “/var/named”;
allow-transfer { 10.126.24.2/32; };
pid-file “/var/named/named.pid”;
};

logging {
category lame-servers { null; };
};

zone “.” IN {
type hint;
file “named.root”;
};

zone “localhost” IN {
type master;
file “db.localhost”;
allow-update { none; };
};

zone “0.0.127.in-addr.arpa” IN {
type master;
file “db.127.0.0”;
allow-update { none; };
};

zone “24.126.10.in-addr.arpa” IN {
type master;
file “db.10.126.24”;
};

Kemudian meng-generate file konfigurasi yang akan digunakan oleh program rndc, ingat hasil dari perintah rndc-confgen bisa jadi berbeda dengan apa yang ditampilkan disini :

# /usr/local/named/sbin/rndc-confgen

Kemudian copy-paste dari hasil perintah tersebut diatas mulai dari baris “# Start of rndc.conf” sampai dengan baris “# End of rndc.conf”, simpan dengan nama file /usr/local/named/etc/rndc.conf . Kemudian copy-paste lagi dengan menghilangkan tanda “#”, mulai dari baris “# key “rndc-key”…” sampai dengan baris yang hampir paling bawah diatas baris “# End of named.conf ” yaitu sampai dengan baris “};” kemudian tambahkan pada file /usr/local/named/etc/named.conf . Sebagai contohnya adalah sebagai berikut ini, isi dari file /usr/local/named/etc/rndc.conf misalnya :

# Start of rndc.conf
key “rndc-key” {
algorithm hmac-md5;
secret “2LCJImnMimOwc1odWR6jfg==”;
};

options {
default-key “rndc-key”;
default-server 127.0.0.1;
default-port 953;
};
# End of rndc.conf

Sedangkan pada file /usr/local/named/etc/named.conf ditambahkan sebagai berikut :

key “rndc-key” {
algorithm hmac-md5;
secret “2LCJImnMimOwc1odWR6jfg==”;
};

controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { “rndc-key”; };
};

# /usr/local/named/sbin/rndc-confgen > confgen.tmp
# grep -v “^#” confgen.tmp > /usr/local/named/etc/rndc.conf
# grep “^#” confgen.tmp | sed 1,3d | sed -e “s/\# //g” | sed -e “s/End of named.conf//g” >> /usr/local/named/etc/named.conf
# rm -rf confgen.tmp

# chown -R named.named /var/named
# /usr/local/named/sbin/named -u named -c /usr/local/named/etc/named.conf

# echo “/usr/local/named/sbin/named -u named -c /usr/local/named/etc/named.conf” >> /etc/rc.local
# echo “nameserver 127.0.0.1” > /etc/resolv.conf

Testing query menggunakan name server localhost dengan perintah host :
# host 127.0.0.1
1.0.0.127.in-addr.arpa domain name pointer localhost.
[root@wedus named]# host localhost
localhost has address 127.0.0.1

Atau dengan menggunakan perintah dig :

# dig -x 127.0.0.1
; <<>> DiG 9.2.2rc1 <<>> -x 127.0.0.1
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64212
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:
;1.0.0.127.in-addr.arpa. IN PTR

;; ANSWER SECTION:
1.0.0.127.in-addr.arpa. 86400 IN PTR localhost.

;; AUTHORITY SECTION:
0.0.127.in-addr.arpa. 86400 IN NS localhost.

;; ADDITIONAL SECTION:
localhost. 86400 IN A 127.0.0.1

;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sat Feb 15 13:58:48 2003
;; MSG SIZE rcvd: 93

Demikian semoga dapat membantu rekan2 sekalian

kutipan : http://www.layangan.com/asfik/writings/dns-bind.html

Iklan

Read Full Post »