Part-3:

Bind Server Installation + configurations

 

3.1 Install bind server using yum

[root@dns ~]# yum install -y bind-utils bind-libs bind-*
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: centos.telecoms.bg
 * extras: centos.telecoms.bg
 * updates: centos.telecoms.bg
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package bind.i686 32:9.7.3-8.P3.el6_2.3 will be installed
---> Package bind-devel.i686 32:9.7.3-8.P3.el6_2.3 will be installed
---> Package bind-dyndb-ldap.i686 0:0.2.0-7.el6_2.1 will be installed
---> Package bind-libs.i686 32:9.7.3-8.P3.el6_2.3 will be installed
---> Package bind-sdb.i686 32:9.7.3-8.P3.el6_2.3 will be installed
---> Package bind-utils.i686 32:9.7.3-8.P3.el6_2.3 will be installed
--> Finished Dependency Resolution

Installed:
  bind.i686 32:9.7.3-8.P3.el6_2.3
  bind-devel.i686 32:9.7.3-8.P3.el6_2.3
  bind-dyndb-ldap.i686 0:0.2.0-7.el6_2.1
  bind-libs.i686 32:9.7.3-8.P3.el6_2.3
  bind-sdb.i686 32:9.7.3-8.P3.el6_2.3
  bind-utils.i686 32:9.7.3-8.P3.el6_2.3

Complete!

3.2 : Start service and make it available on start up.

[root@dns ~]# service named start && chkconfig named on
Starting named:                                            [  OK  ]

3.3 : Edit /etc/named.conf (you can use this file’s contents)

[root@dns ~]# vi /etc/named.conf
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//

options {
        listen-on port 53 { 127.0.0.1; 192.168.2.30; };
        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     { localhost; 192.168.2.0/24; };
        recursion yes;

        dnssec-enable yes;
        dnssec-validation yes;
        dnssec-lookaside auto;

        /* Path to ISC DLV key */
        bindkeys-file "/etc/named.iscdlv.key";

};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

zone "." IN {
        type hint;
        file "named.ca";
};

include "/etc/named.rfc1912.zones";

/* Broexperts.com Forward Zone */

zone "broexperts.com" IN {
        type master;
        file "broexperts.com.fwd";
        allow-update {none;};
};

/* Broexperts.com Reverse Zone */

zone "2.168.192.in-addr.arpa" IN {
        type master;
        file "broexperts.com.rev";
        allow-update {none;};
};

3.4 : create forward zone files in /var/named/

[root@dns ~]# cd /var/named/
[root@dns ~]# vi broexperts.com.fwd
$ORIGIN broexperts.com.
$TTL 84600

@       IN      SOA     dns.broexperts.com. root@broexperts.com. (
                        123312          ; serial
                        1h              ; refresh
                        2h              ; retry
                        1w              ; expire
                        1h)             ; min cache
@       IN      NS      dns.broexperts.com.
@       IN      A       192.168.2.30

; Network Hosts

loadb1  IN      A       192.168.2.1
loadb2  IN      A       192.168.2.2
websrv1 IN      A       192.168.2.10
websrv2 IN      A       192.168.2.11
dbase1  IN      A       192.168.2.20
dbase2  IN      A       192.168.2.21
dns     IN      A       192.168.2.30
ntp     IN      A       192.168.2.31

3.5 : create reverse zone files in /var/named/

[root@dns ~]# cp broexperts.com.fwd broexperts.com.rev
[root@dns ~]# vi broexperts.com.rev
$ORIGIN 2.168.192.in-addr.arpa.
$TTL 84600

@       IN      SOA     dns.broexperts.com. root@broexperts.com. (
                        123312          ; serial
                        1h              ; refresh
                        2h              ; retry
                        1w              ; expire
                        1h)             ; min cache
@       IN      NS      dns.broexperts.com.
@       IN      A       192.168.2.30

; Network Hosts

1       IN      PTR     loadb1.broexperts.com.
2       IN      PTR     loadb2.broexperts.com.
10      IN      PTR     websrv1.broexperts.com.
11      IN      PTR     websrv2.broexperts.com.
20      IN      PTR     dbase1.broexperts.com.
21      IN      PTR     dbase2.broexperts.com.
30      IN      PTR     dns.broexperts.com.
31      IN      PTR     ntp.broexperts.com.

3.6 : Restart Service

[root@dns named]# service named restart
Stopping named: .                                          [  OK  ]
Starting named:                                            [  OK  ]

Part-4: lvs (Linux virtual server) Active & Backup Load-Balancer settings.