#apt-get install bind9 dnsutilsEdit file /etc/bind/named.conf
Tambahkan zone domain :
zone "emnaz.org" {Zone untuk reverse :
type master;
file "/etc/bind/db.emnaz.org";
};
zone "4.168.192.in-addr.arpa" {Gunakan file /etc/bind/db.empty untuk contoh
type master;
file "/etc/bind/db.4.168.192";
};
# cd /etc/bind/Edit file db.emnaz.org
# cp db.empty db.emnaz.org
nama domain: emnaz.org, email info ke: admin@emnaz.org.
@ IN SOA emnaz.org. admin.emnaz.org. (Reverse zone
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
86400 ) ; Negative Cache TTL
;
@ IN NS ns1.emnaz.org.
emnaz.org. IN MX 10 mail.emnaz.org.
emnaz.org. IN A 192.168.4.146
mail IN A 192.168.4.146
pc1 IN A 192.168.4.1
www IN CNAME emnaz.org.
# cp db.empty db.4.168.192Edit file db.4.168.192
@ IN SOA emnaz.org. admin.emnaz.org. (Edit /etc/resolv.conf
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
86400 ) ; Negative Cache TTL
;
IN NS ns1.emnaz.org.
146 IN PTR ns1.emnaz.org.
1 IN PTR pc1.emnaz.org.
nameserver 127.0.0.1Test query
#dig mail.emnaz.orgReverse zone test
; <<>> DiG 9.5.1-P1 <<>> mail.emnaz.org
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46362
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;mail.emnaz.org. IN A
;; ANSWER SECTION:
mail.emnaz.org. 86400 IN A 192.168.4.146
;; AUTHORITY SECTION:
emnaz.org. 86400 IN NS ns1.emnaz.org.
;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Apr 12 14:02:33 2009
;; MSG SIZE rcvd: 66
# dig -x 192.168.4.1
; <<>> DiG 9.5.1-P1 <<>> -x 192.168.4.1
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 63254
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;1.4.168.192.in-addr.arpa. IN PTR
;; ANSWER SECTION:
1.4.168.192.in-addr.arpa. 86400 IN PTR pc1.emnaz.org.
;; AUTHORITY SECTION:
4.168.192.in-addr.arpa. 86400 IN NS ns1.emnaz.org.
;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Apr 12 14:04:20 2009
;; MSG SIZE rcvd: 87
Links:
Ubuntu DNS Server
No comments:
Post a Comment