Module – 18 Domain Name Server (DNS)

What is DNS?

  • Domain Name Servers (DNS) are the Internet's equivalent of a phone book.
  • They maintain a directory of domain names and translate them to Internet Protocol (IP) addresses.
  • This is necessary because, although domain names are easy for people to remember,
    computers or machines, access websites based on IP addresses.

dns1

dns2

 

dns3

 

Oky…Let us go for DNS server configuration:

Step:1 Install DNS packages & start the service.

# yum install bind

# service named start

 # chkconfig named on

 

Step: 2 Verify the package detail:

# rpm –qa -c bind

/etc/logrotate.d/named
/etc/named.conf
/etc/named.iscdlv.key
/etc/named.rfc1912.zones
/etc/named.root.key
/etc/rndc.conf
/etc/rndc.key
/etc/sysconfig/named
/var/named/named.ca
/var/named/named.empty
/var/named/named.localhost
/var/named/named.loopback

Step: 3 Update /etc/resolv.conf

# Generated by NetworkManager
domain localdomain
search localdomain example.com
nameserver 10.0.1.100


Step: 4 Update /etc/hosts

server dnsserver.example.com 10.0.1.100

Step: 5 Update /etc/named.conf

1 //
2 // named.conf
3 //
4 // Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
5 // server as a caching only nameserver (as a localhost DNS resolver only).
6 //
7 // See /usr/share/doc/bind*/sample/ for example named configuration files.
8 //
9
10 options {
   11         listen-on port 53 {10.0.1.100;};
     12 #       listen-on-v6 port 53 { ::1; };
13         directory       “/var/named”;
14         dump-file       “/var/named/data/cache_dump.db”;
15         statistics-file “/var/named/data/named_stats.txt”;
16         memstatistics-file “/var/named/data/named_mem_stats.txt”;
   17         allow-query     {localhost;any;};
18         recursion yes;
19
20         dnssec-enable yes;
21         dnssec-validation yes;
22         dnssec-lookaside auto;
23
24         /* Path to ISC DLV key */
25         bindkeys-file “/etc/named.iscdlv.key”;
26
27         managed-keys-directory “/var/named/dynamic”;
28 };
29
30 logging {
31         channel default_debug {
32                 file “data/named.run”;
33                 severity dynamic;
34         };
35 };
36
37 zone “.” IN {
38         type hint;
39         file “named.ca”;
40 };
41
42 include “/etc/named.rfc1912.zones”;
43 include “/etc/named.root.key”;

 


Step: 6 Update /etc/named.rfc1912.zones

1 // named.rfc1912.zones:
2 //
3 // Provided by Red Hat caching-nameserver package
4 //
5 // ISC BIND named zone configuration for zones recommended by
6 // RFC 1912 section 4.1 : localhost TLDs and address zones
7 // and http://www.ietf.org/internet-drafts/draft-ietf-dnsop-default-local-zones-02.txt
8 // (c)2007 R W Franks
9 //
10 // See /usr/share/doc/bind*/sample/ for example named configuration files.
11 //
12
   13 zone “example.com” IN {
14         type master;
15         file “named.localhost”;
16         allow-update { none; };
17 };
18
19 zone “localhost” IN {
20         type master;
21         file “named.localhost”;
22         allow-update { none; };
23 };
24
25 zone “1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa” IN {
26         type master;
27         file “named.loopback”;
28         allow-update { none; };
29 };
30
     31 zone “1.0.10.in-addr.arpa” IN {
32         type master;
33         file “named.loopback”;
34         allow-update { none; };
35 };
36
37 zone “0.in-addr.arpa” IN {
38         type master;
39         file “named.empty”;
40         allow-update { none; };
41 };

Note:

For line-31, if your IP is 192.168.1.100, then you have to type 1.168.192.in-addr.arpa

Step: 7 Update /var/named/named.localhost  (for forward lookup i.e., Name to IP resolve)

var_named_named.localhost

Step: 8 Update /var/named/named.loopback  (for reverse lookup i.e., IP to Name resolve)

 

var_named_named.loopback

SOA – State of Authority is information stored in a domain name system (DNS) zone about that zone and about other DNS records

PTR – Pointer record for reverse lookup

Step: 9 Restart DNS service

# service named restart

Step: 10 Verify DNS by running nslookup:

nslookup dnsmaster

nslookup IP

Now, check the client  [root@client ~]# vi /etc/resolv.conf

# Generated by NetworkManager
domain localdomain
search localdomain example.com
nameserver 10.0.1.100



For additional local NYC Car Service visit nycairportslimo. Benefit from fantastic savings on Limo Service to JFK from CT , just by taking a look at ctairlink.com/

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>