Pages

Subscribe:

Pages

21 Jan 2012

Setting DNS Server

Setting DNS Server

Pada terminal, masukkan perintah berikut untuk menginstal dns:
$ sudo apt-get install bind9
Untuk pengujian dan troubleshooting masalah DNS adalah paket dnsutils. Untuk menginstal dnsutils masukkan berikut ini:
$ sudo apt-get install dnsutils
Edit /etc/bind/ named.conf.options : (tambahkan DNS IP ISP Anda)
$ sudo gedit /etc/bind/named.conf.options
directory “/var/cache/bind”;
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0′s placeholder.
// forwarders {
// 0.0.0.0;
// };
// Menambah IP DNS ISP Anda
forwarders {
202.155.0.10;
202.155.0.15;
};
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};
Primary Master untuk domain wahcilik.com. Edit /etc/bind/named.conf.local:
$ sudo gedit /etc/bind/named.conf.local
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include “/etc/bind/zones.rfc1918″;
zone “smk3.net”{
type master;
file “/etc/bind/db.tkj02smk3.net”;
};
Membuat file / etc / bind / db.tkj02smk3.net :
# sudo cp /etc/bind/db.local /etc/bind/db.tkj02smk3.net
Edit file /etc/bind/db.tkj02smk3.net
$ sudo gedit /etc/bind/db.tkj02smk3.net
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA ns.tkj02smk3.net. root.tkj02smk3.net. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.tkj02smk3.net.
@ IN A 192.168.1.218
@ IN AAAA ::1
ns IN A 192.168.1.218
www IN A 192.168.1.218
Reverse Zone File
Edit /etc/bind/named.conf.local :
$ sudo gedit /etc/bind/named.conf.local
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include “/etc/bind/zones.rfc1918″;
zone “.com”{
type master;
file “/etc/bind/db.tkj02smk3.net”;
};
zone “.168.192.in-addr.arpa”{
type master;
notify no;
file “/etc/bind/db.192″;
};
Sekarang buat file /etc/bind/db.192 :
$ sudo cp /etc/bind/db.127 /etc/bind/db.192
Edit /etc/bind/db.192 :
 $ sudo gedit /etc/bind/db.192
;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA ns.tkj02smk3.net. root.tkj02smk3.net. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.
218.0.0 IN PTR ns.tkj02smk3.net.
$ sudo /etc/init.d/bind9 restart
resolv.conf
edit /etc/resolv.conf :
  $ sudo gedit /etc/resolv.conf
nameserver 192.168.50.1
nameserver 202.155.0.10
nameserver 202.155.0.15
restart BIND9:
$ sudo /etc/init.d/bind9 restart
lalu ping tkj02smk3.net

Tidak ada komentar:

Posting Komentar