Purpose: Install Bind Dns Server On The Local Machine and Configure

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Bind DNS Server

Lab 1

Purpose: Install bind dns server on the local machine and configure
forward and reverse zones.

Procedure:

Install bind server


[root@lks9-vm ~]# yum install bind

Configure /etc/named.conf file. Pay attention to the options section and


configure forwarders:

options {
listen-on port 53 { any; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { any; };
recursion yes;
forwarders { 8.8.8.8; };
dnssec-enable no;
dnssec-validation no;
dnssec-lookaside no;

/* Path to ISC DLV key */


bindkeys-file "/etc/named.iscdlv.key";

managed-keys-directory "/var/named/dynamic";
};

Up to this point, the server can be considered a caching-only nameserver.

Test using the host command:

[root@centos63 named]# host www.gsp.ro 127.0.0.1


To define a forward zone add the following entry in /etc/named.conf:

zone "demo.telacad.ro" IN {
type master;
file "demo.telacad.ro.db";
allow-update { none; };
};

Define /var/named/demo.telacad.ro.db file:

[root@centos63 named]# cat demo.telacad.ro.db


$TTL 86400
@ IN SOA dns.demo.telacad.ro. root.demo.telacad.ro. (
2013052201 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTL
)
@ IN NS dns.demo.telacad.ro.
dns IN A 192.168.1.200
web IN A 192.168.1.201

To define a reverse zone, add the following entry in /etc/named.conf:

zone "1.168.192.in-addr.arpa" IN {
type master;
file "rev.demo.telacad.ro.db";
allow-update { none; };
};

Than define the /var/named/rev.demo.telacad.ro.db zone file:

[root@centos63 named]# cat rev.demo.telacad.ro.db


$TTL 86400
@ IN SOA dns.demo.telacad.ro. root.dns.demo.telacad.ro. (
2013052201 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTL
)
@ IN NS dns.demo.telacad.ro.
dns IN A 192.168.1.200
200 IN PTR dns.demo.telacad.ro.
201 IN PTR web.demo.telacad.ro.

You might also like