Top Ad unit 728 × 90

Latest updates

recent

DNS SERVER




#### TO CONFIGURE THE DNS SERVER ####
'Step 1:-Check the IP & Assign the Hostname'
# ifconfig (to check)
# hostname dns.abc.com
# vi /etc/hosts (provide host entry with ip)
# vi /etc/hostname (to make host permanent)

'Step 2:-Install the Package'
# yum install bind* -y

'Step 3:-Edit 1st Main Configuration File'

# vim /etc/named.rfc1912.zones
Set the line no & do the modification
line no 19-23 for FORWARD LOOKUP ZONE (FLZ)
line no 31-35 for REVERSE LOOKUP ZOME (RLZ)

(Line no:19-23)

              zone "abc.com" IN {
                    type master;
                        file "forward";
                                 allow-update { none; };
                                };

(Line no:31-35)
                   zone "0.168.192.in-addr.arpa" IN {
                         type master;
                                file "reverse";
                                     allow-update { none; };
                                         };
                         :wq(save & quit the file)

'Step 4:-Create Zone Files in DNS Database'
# cd /var/named (to access dns database)
# cp -p named.localhost forward (for FLZ)
# cp -p named.loopback reverse (for RLZ)
# ls (to check)
# vim forward
Do the modification as given below near the objects
SOA dns.abc.com. rname.invalid. (
NS dns.abc.com.
dns A 192.168.0.100
:wq(save & quit the file)
# vim reverse
Do the modification as given below near the objects
SOA dns.abc.com. rname.invalid. (
NS dns.abc.com.
100 PTR dns.abc.com.
:wq(save & quit the file)

'Step 5:-Edit 2nd Main Configuration File'
# vim /etc/named.conf
Go to line no.11 & add self system ip,as given below
listen-on port 53 { 127.0.0.1;192.168.0.100; };
Go to line no.17 & allow query to all,as given below
allow-query { localhost;any; };
:wq(save & quit the file)

'Step 6:-Edit 3rd M.C.F'
# vim /etc/resolv.conf
nameserver 192.168.0.100
:wq(save & quit the file)

'Step 7:-Restart the Service'
# service named restart
# systemctl enable named.service

'Step 8:-To Check the DNS Configuration'
# dig dns.abc.com (to resolve with name)
# dig -x 192.168.0.100 (to resolve with ip)
NOTE:-If you got Answer:1,then configuration is correct
If you got Answer:0,then configuration is incorrect

'Step 9:-To Check the Configuration from Client'
Go to Client PC
# vi /etc/resolv.conf (in client pc)
nameserver 192.168.0.100
:wq(save & quit the file)
# dig dns.abc.com.
# dig -x 192.168.0.100
# ping dns.abc.com (to check the ip)

'TO ADD THE SERVERS INTO DNS,BELONGS TO SAME DOMAIN'

(1)Configure One Server in Separate PC (for ex:ftp server) with
the Hostname: ftp.abc.com IP:192.168.0.99 for example
(2)Add this Server Entry with IP into DNS - FLZ file
# cd /var/named (in dns server)
# vim forward (open flz)
add the entry as given below
NS dnsabc.com.
NS ftp.abc.com.
dns A 192.168.0.100
ftp A 192.168.0.99 (for ex:ftp server ip)
:wq(save & quit the file)
# service named restart
(3)To check the Result-Go to Client PC & Add the DNS
Ip into resolv.conf file & try to access FTP Server with
name (ftp://ftp.abc.com)
DNS SERVER Reviewed by Unknown on 10:51 AM Rating: 5
© 2007 - 2016. All Rights Reserved by Babashaheer Blog

Contact Form

Name

Email *

Message *

Powered by Blogger.