banner



How To Install Dns In Centos 7

To install and configure DNS server in CentOS seven

Domain Proper noun System or DNS is a service that volition resolve the host name for the particular IP address. When we search for a domain namely www.google.com in browser, the . (dot) seperating the domain name will search for the root server of namespace. Globally at that place are xiii root servers bachelor to resolve the query. The DNS will lookup to a local resolver that contains an entry near the DNS server information, if there is no such record in local resolver, the search escalates to Top Level Domain (TLD), if at that place is no such tape found, the search will escalate to the administrative server. The browser will enshroud the DNS request for hereafter uses. This is the piece of work process of DNS server. This tutorial will explain the installation and configuration procedure of DNS server in CentOS seven.


Installation and Configuration procedure

To proceed with the installation procedure, install the bind packet using the following command and press y to continue with the installation procedure.

          [[email protected] ~]# yum install bind* -y          BDB2053 Freeing read locks for locker 0x3c91: 2296/139663582197568 BDB2053 Freeing read locks for locker 0x3c93: 2296/139663582197568 Loaded plugins: fastestmirror, langpacks base of operations                                                     | 3.half-dozen kB     00:00      extras                                                   | iii.4 kB     00:00      updates                                                  | 3.four kB     00:00      extras/7/x86_64/primary_db                                 | 191 kB   00:00      Determining fastest mirrors * base: mirrors.nhanhoa.com . .  bind-sdb-chroot.x86_64 32:9.nine.4-50.el7_3.1                                       bind-utils.x86_64 32:9.ix.4-50.el7_3.1                                           Consummate!

Edit the Configuration file of the name server using vim editor. Add master DNS server IP in heed on port 53 selection. Enter IP range of hosts in the allow-query option and define forward and reverse lookup zone for the primary DNS server. Make the following changes and save information technology.

          [[email protected] ~]# six /etc/named.conf          zone " linuxhelp11.com"  IN { type chief  file " fwd.linuxhelp11"   allow-update { none  }  }   zone " vii.168.192.in-addr.arpa"  IN { blazon master  file " rev.linuxhelp11"   allow-update { none  }  }        

Enter into named directory by running the cd command as follows.

          [[email protected] ~]# cd /var/named/                  

Create forward zone files using vim editor. Add the post-obit lines to the file and save information technology.

          [[electronic mail protected] named]# vim fwd.linuxhelp11                    $TTL 86400 @   IN  SOA     ns1.linuxhelp11.com. root.linuxhelp11.com. (         2022071001   Series         3600         Refresh         1800         Retry         604800       Expire         86400        Minimum TTL ) @       IN  NS          ns1.linuxhelp11.com. @       IN  A           192.168.7.236 ns1     IN  A           192.168.7.236

Now create reverse zone files. Add the post-obit lines to the file and save information technology.

          [[email protected] named]# vim rev.linuxhelp11          Add together the following lines to the file $TTL 86400 @   IN  SOA     ns1.linuxhelp11.com. root.linuxhelp11.com. (         2022071001   Series         3600         Refresh         1800         Retry         604800       Expire         86400        Minimum TTL ) @       IN  NS          ns1.linuxhelp11.com. ns1     IN  A           192.168.7.236 236     IN  PTR         ns1.linuxhelp11.com.

Outset the DNS service by executing the post-obit command.

          [[electronic mail protected] named]# systemctl outset named.service                  

Next add port in the firewall and reload the firewall by running the post-obit commands.

          [[e-mail protected] named]# firewall-cmd --permanent  --add-port=53/tcp          success          [[email protected] named]# firewall-cmd --permanent  --add-port=53/udp          success          [[email protected] named]# firewall-cmd --reload          success

To check for errors in the configuration file and zone file execute the set of following commands. The configuration of DNS is at present complete.

          [[email protected] named]# named-checkconf /etc/named.conf  [[electronic mail protected] named]# named-checkzone linuxhelp11.com /var/named/fwd.linuxhelp11          zone linuxhelp11.com/IN: loaded serial 2022071001 OK          [[e-mail protected] named]# named-checkzone linuxhelp11.com /var/named/rev.linuxhelp11          zone linuxhelp11.com/IN: loaded serial 2022071001 OK

To cheque the DNS service, requite the DNS car IP to client machine (here nosotros are using windows machine as the client) and check for the IPv4 DNS server in network connection details.
network details
Switch over to the browser and search for whatsoever sites like YouTube.
browser
It volition lead the browser page to Youtube without any glitches.
youtube

Another method to bank check the DNS is to open the command prompt in customer machine and give the control nslookup google.com. Information technology will show the output that the internet is working from our DNS by the client machine' due south IP accost. terminal

The installation and configuration procedure of DNS server in CentOS 7 is done successfully.

Source: https://www.linuxhelp.com/how-to-install-and-configure-dns-server-in-centos-7

Posted by: bakerthomedran1983.blogspot.com

0 Response to "How To Install Dns In Centos 7"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel