Wednesday, December 15, 2010

Setting DNS

Seting Dns di Ubuntu

Primary Master

forward zone file

>>>>edit :/etc/bind/named.conf.local:
zone "example.com" {
type master;
file "/etc/bind/db.example.com";
};
>>>>buat file /etc/bind/db.example.com dengan perintah :
sudo cp /etc/bind/db.local /etc/bind/db.example.com

>>>>buat zone baru dengan edit file /etc/bind/db.example.com
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA ns.example.com. root.example.com. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.example.com.
@ IN A 192.168.1.10
ns IN A 192.168.1.10

Reverse Zone

>>>>>Edit /etc/bind/named.conf.local dan tambahkan :

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

>>>>>Buat file /etc/bind/db.192 dengan perintah :

sudo cp /etc/bind/db.127 /etc/bind/db.192


>>>>>>edit /etc/bind/db.192 dan rubah sesuai dengan file /etc/bind/db.example.com:
;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA ns.example.com. root.example.com. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.
10 IN PTR ns.example.com.


restart BIND9:

sudo /etc/init.d/bind9 restart

No comments: