Please go through theory. This is Just a basic to setup DNS Server. DNS server require bind packages to Setup DNS server. for this example our DNS server hostname will be yum-dns.mylabs.org. where mylabs.org is our local domain.
We have installed yum-dns.mylabs.org on rhel5.8. Make sure Firewall and selinux are disabled, if you are not sure , how it works.
Server Side
1. yum install bind
2. yum install bind-util
3. yum install system-config-bind
4. system-confg-bind
5. download and copy named.root from internet under /var/named
6. Now update the /etc/named.conf with zone file information for example ( first zone file is
forward dns and second is reverse zone file.)
=============================================
zone "mylabs.org." IN {
type master;
file "mylabs.org";
allow-update { none; };
};
zone "133.168.192.in-addr.arpa." IN {
type master;
file "133.168.192.in-addr.arpa";
allow-update { none; };
};
=================================================
Now make Zone File ( first Forward zone file and then reverse zone file )
7. vi /var/named/mylabs.org
==============================================================
$TTL 86400
mylabs.org.
IN SOA ns1.mylabs.org.
root.mylabs.org (
2012110914 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS ns1.mylabs.org.
yum-dns. IN A
192.168.133.10
==============================================================
Now create reverse Zone File
9. vi /var/named/133.168.192.in-addr.arpa
======================================================
$TTL 86400
@ IN
SOA ns1.mylabs.org. root.mylabs.org. (
2012110901 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN
NS ns1.mylabs.org.
======================================================================
10. /etc/init/named restart
Client Side
1. vi /etc/resolv.conf
search mylabs.org
nameserver 192.168.133.10
2. Check using below command
for forward DNSentry
• dig
• nslookup
for reverse DNSentry
• dig -x
• nslookip

No comments:
Post a Comment