Sunday 17 April 2011

Install dan konfigurasi DNS, BIND9

Install terlebih dahulu paket DNS
- apt-get install bind9

kemudian ikuti langkah berikut

1. gedit /etc/network/interfaces



auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1




2. 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 "abdul.com"
{

type master;
file "/etc/bind/db.abdul.com";
};

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



3. gedit /etc/bind/named.conf.options




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 {
192.168.1.100;
};

auth-nxdomain no;    # conform to RFC1035
listen-on-v6 { any; };
};


4. cp /etc/bind/db.local  /etc/bind/db.abdul.com

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

6. gedit /etc/bind/db.abdul.com



;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA abdul.com. root.abdul.com. (
     2 ; Serial
604800 ; Refresh
 86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS abdul.com.
IN A 192.168.1.100
www IN A 192.168.1.100
ftp IN CNAME abdul.com.
mail IN A 192.168.1.100


7. gedit /etc/bind/db.192

;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA abdul.com. root.abdul.com. (
     1 ; Serial
604800 ; Refresh
 86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
IN NS abdul.com.
100 IN A abdul.com.
100 IN PTR abdul.com.
100 IN PTR mail.abdul.com.


8. gedit /etc/hosts


127.0.0.1 localhost
192.168.1.100 abdul.com abdul

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts


9. gedit /etc/resolv.conf

# Generated by NetworkManager
nameserver 192.168.1.100
domain abdul.com
search abdul.com

10. restart dns system nya...

ok.. selamat mencoba..

0 komentar:

Post a Comment