Domain Name Service
When you’re trying to access a
website, you type is the name you are looking for and it comes up. In the
background, though, Domain Name Service (DNS) is what translates that website
name in to an IP address so that the site may be accessed. This translation
also occurs when you are connecting to other system on your network through
their hostnames instead of their IP addresses.
DNS plays a critical role not
only in your network, but also on the Internet as a whole. Knowing how to set
up, maintain, and troubleshoot such a server is vital to any network. The root
DNS servers for the world run BIND as their DNS software choice, so naturally
Red Het also includes it on the exams.
Prerequisite for DNS Server
Ø Yum process
Ø IP setting and Hostname set
Ø IP tables Flash
Ø Hosts profile update
Step-1: Verify that packages have been
installed.
# rpm □
–qa □ bind*
Step-2: Verify that packages have been
installed.
#
rpm □ -qa □ caching*
Information about DNS
At this point, you need to decide
what type of DNS server you would like to setup. According to Red Hat, there
are two types of name servers:
v Authoritative – These name servers answer to resource
records that are part of their zones only. This includes both primary (master)
and secondary (slave) name servers.
v Recursive – These name servers offer resolution
service but are not authoritative for any zone. All query answers are cached in
memory for fixed period of time.
There
is another way can classify name servers:
v Master – This name server stores original and
authoritative zone records for a particular namespace. It also answers queries
about the namespace from other name servers. Each domain must have at least one
master.
v Slave – Although this name server receives its
namespace information from a master name server, this name server type can
answer queries for which it has authority. Used for load balancing and
redundancy.
v Caching – This name server has no authority and
is primarily used for name-to-IP resolution. All resolutions are cached for a
fixed period of time. Heavily used by Internet service providers (ISPs).
v Forwarding – This name server has no authority and
is used only to forward requests to specific name servers for resolution.
Configuring Preferred DNS Server
Setting
up BIND
Step-1.1: Install the required packages for BIND:
# yum □ install □ bind*
Step-1.2:
Verify
that packages have been installed.
# rpm □
–qa □ bind*
Setting
up CACHING
Step-2.1: Install the required package for
CACHING.
# yum □ install □ caching*
Step-2.2: Verify that packages have been
installed.
#
rpm □ -qa □ caching*
Step-3.1: Ensure that the
service is set to start on system boot:
#
chkconfig □ named □ on
Or
# ntsysv
Step-3.2: Verify that the
service is set to start on boot:
#
chkconfig □ --list □ named
Note: There are also a handful of configure files:
/etc/resolv.conf
[
This file contain resolve information ]
/etc/named.caching-nameserver.conf
[This file contain name server caching
information]
/etc/named.rfc1912.zones
[This file
contain forward lookup zone and reveres lookup zone files.]
/var/named/chroot/var/named/localhost.zone
[Forward lookup zone file means
localhost.zone file. This file convert domain name-to-IP]
/var/named/chroot/var/named/named.local
[Reveres lookup zone file means
named.local file. This file converts IP-to-domainname]
Step-3: Edit named.caching-nameserver.conf file for
declare Access Control List (ACL).
#
vi □ /etc/named.caching-nameserver.conf
Step-4: Edit named.rfc1912.zones file for declare
Zone file and Domain name.
#
cd □ /var/named/chroot/var/named
# cp □ localhost.zone □ nabil.fzone
Step-6:
named.local
file copy for Edit in this name nabil.rzone.
# cd □ /var/named/chroot/var/named
# cp □ named.local □ nabil.rzone
Step-7:
Setting
execution permeation two file nabil.fzone and nabil.rzone
# chmod □ 755 □ nabil.fzone
# chmod □ 755 □ nabil.rzone
Or
#
chgrp □ named □ nabil.fzone
# chgrp □ named □ nabil.rzone
Step-8:
Edit
Resolve file for set name server IP and domain name.
Step-9: Open nabil.fzone
file for edit to set own information.
# cd □ /var/named/chroot/var/named
# vi □ nabil.fzone
Step-10: Open nabil.rzone
file for edit to set own information.
# cd □ /var/named/chroot/var/named
# vi □ nabil.rzone
Step-11: Enable the service to start during boot:
#
chkconfig □ named □ on
Or
# ntsysv
Step-12: Use iptables to create the
required firewall rule:
#
iptables □ –I □ INPUT □ 5 □ –p □ udp □ –m □ - - dport □ 67 □ –j □ ACCEPT
Step-13: Save the firewall rule you just
created.
#
service □ iptables □ save
Step-14: Then restart the iptables
service.
# service □
iptables □ restart
Step-15:
Restart
named service for DNS with Firewall and SELinux.
# service □ network □ restart
# service □ portmap □ restart
# service □ named □ restart
Step-16:
Verify
that the name server is Oky.
# dig □ -x □ 192.168.1.100 [ DNS IP Address]
# dig □ sandwip.com [Domain name]
# host □ sandwip.com [Domain name]
# nslookup □ sandwip.com
# ping □ sandwip.com
Step-14:
Verify
that the name server from Windows client and Linux client.
Windows Client
Ø IP setting
Ø DNS IP setting
Ø Ping
Linux
Client
Ø IP seting with DNS address
Ø /etc/resolv.conf files
update.
Ø /etc/hosts file
update.
[The End Primary DNS Server]
No comments: