Friday 10 August 2012

DNS Server Configuration RHEL 6.0



                        
Step 1 # Installation
#yum install bind*
Ver:  bind9.7
Port: 53
Log file: /var/log/messages

Step 2 #Edit Configuration file

Disable IPV6 - set if you don't use IPv6 ( if use, don't set it )
#vim /etc/sysconfig/named/
OPTIONS=”-4”
:wq

Editing named.conf
#vim /etc/named.conf

listen-on port 53 { any; };
#listen-on-v6 port 53 { ::1; }; (disable this)
allow-quiery { any; };

zone “example.com” IN {
            type master;
            file “example.for”;
            allow-update { 192.168.1.3; }; (dhcp ip)
};
zone “1.168.192.in-addr.arpa” IN {
            type master;
            file “example.rev”;
            allow-update { 192.168.1.3; }; (dhcp ip)
};
:wq



#vim /var/named/example.for
$TTL 86400
@   IN  SOA     svr1.example.com. root.example.com. (
                      2011071001  ;Serial
                      3600        ;Refresh
                      1800        ;Retry
                      604800      ;Expire
                      86400       ;Minimum TTL
)
            IN        NS       svr1.example.com.
svr1     IN        A         192.168.168.2

:wq



# vim /var/named/example.rev
$TTL 86400
@   IN  SOA     svr1.example.com. root.example.com. (
                            2011071001  ;Serial
                            3600        ;Refresh
                            1800        ;Retry
                            604800      ;Expire
                            86400       ;Minimum TTL
)
       IN     NS     svr1.example.com.
2      IN     PTR    svr1.example.com.

:wq

#cd /var/named/chroot/var
#chmod g+w named –Rvf

Step 3 # Check configuration files
named-checkzone example.com /var/named/chroot/var/named/example.for
named-checkzone 1.168.192.in-addr.arpa /var/named/chroot/var/named/example.rev


@@@Every linux client hostname should be without FQDN like below@@
/etc/sysconfig/network
HOSTNAME=client1

Client for Linux
#vim /etc/sysconfig/network-scripts/ifcfg-eth0
DHCP_HOSTNAME=client1 (only hostname not FQDN)
:wq
Client for windows
#Window automatically work without issue

Definition
$TTL – Time to live value The purpose of a TTL is to reduce the number of DNS queries the authoritative DNS server has to answer
 
PTR   - Fully qualified server name
CNAME - "A" record name for the server
A     - IP address of server
MX    - Mail server DNS name
NS    - IP address or CNAME of the name server
D     - signifies day
W     - signifies weeks
H     - signifies hours
SOA   - Start of Authority which contains general administrative and control information about the domain. It has the format:
Name Class Type Name-Server Email-Address (
                               ; Serial-No
                               ; refresh
                               ; retry
                               ; expiry
                               ; minimum TTL
)
 
 
 
 

No comments:

Post a Comment