Configuring DNS server in RHEL 6

# yum install bind* -y

# vim /etc/named.conf
            listen-on port 53 { 192.168.1.1; };
            allow-query     { any; };
go to the end of file and type the below configuration
zone "dynamite.com" IN {
                        type master;
                        file "dynamite.com";
                        allow-update { none; };
};
         
zone "1.168.192.in-addr.arpa" IN {
                        type master;
                        file "dynamite.com.rz";
                        allow-update { none; };
};         
Save and exit the file

# cd /var/named

# vim dynamite.com
$TTL 1D
@         IN SOA dynamite.com             dns-admin.dynamite.com. (
                                                            20111024           ; serial
                                                            1D                    ; refresh
                                                            1H                    ; retry
                                                            1W                   ; expire
                                                            3H )                 ; minimum
@                   IN         NS        dns.dynamite.com.
dns                 IN         A          192.168.1.1
client              IN         A          192.168.1.10

# vim dynamite.com.rz
$TTL 1D
@         IN         SOA     dns.dynamite.com. dns-admin.dynamite.com. (
                                                            20111024           ; serial
                                                            1D                    ; refresh
                                                            1H                    ; retry
                                                            1W                   ; expire
                                                            3H )                 ; minimum

1.168.192.in-addr.arpa.              IN         NS        dns.dynamite.com.
1                                              IN         PTR      dns.dynamite.com
10                                            IN         PTR      client.dynamite.com

# chown root.named dynamite.com

# chown root.named dynamite.com.rz

# chkconfig named on

# service named start

Check whether DNS queries has been resolved or not using the following commands

# dig dns.dynamite.com

# nslookup client.dynamite.com

# nslookup 192.168.1.1

Post a Comment

Mới hơn Cũ hơn