Linux server DNS service structures (analytical positive, reverse analysis)

Detailed experiments:

Experiment: virtual machine set up in centos7 analog resolve DNS forward, reverse lookup service.

Experimental environment: a linux server, bind tool

experiment procedure:

Forward Analysis:

1. Open a Linux server, using the yum repository to install BIND name server build tools.

[Root @ localhost ~] # yum install bind -y bind mounting tool 

[Root @ localhost ~] # rpm -qc bind View profile 

image.png

image.png

2, configure the primary configuration file, modify the listen-on address, and access rights

[Root @ localhost ~] # vim /etc/namde.conf master profile configuration

image.png

image.png

3, configuration zone configuration file, add the domain name to be resolved, and regional data path configuration file is located,

[Root @ localhost ~] # vim /etc/named.rfc1912.zones configuration profile region

image.png

image.png

4, the system comes with the area data configuration file (named.localhost) copied to the area you want to parse the data file (kgc.com.zone/yun.com.zone) self-configuration,

Care to preserve the original permissions, and then go into your zone data files for editing, configure your analytical data.

[root@localhost ~]# cd /var/named/           

[Root @ localhost ~] # cp -p named.localhost kgc.com.zone copy preserving permits to kgc.com.zone

[root@localhost ~]# vim kgc.com.zone     

[root @ localhost ~] #  cp -p named.localhost yun.com.zone copy preserving permits to yun.com.zone

image.png

image.png

image.png

5, turn off the firewall, turn off security enhancements

[Root @ localhost named] # systemctl stop fi rewalld. Service turn off the firewall

[Root @ localhost named] # setenforce 0 close security enhancements

image.png

6, start the named service, open 53 ports, providing dns resolution service to other users

[Root @ localhost named] # systemctl start named starts named service

image.png

7, will resolve the address (local address) to write the file /etc/resolv.conf dns written in

[Rootloca lhost named] #echo "nameserver 192.168.100.100"> etc / resolv. Conf add DNS to resolve the address to write the file

image.png

8, dns forward resolution structures, the local test to see if the experiment is successful. Using the host command.

image.png

Reverse lookup

1, modify the configuration zone configuration file, the reverse copy and paste the template to resolve the space, make changes, simply modify the same two, with positive differences that address or network segment is written backwards. 100.168.192

Guess you like

Origin blog.51cto.com/14475876/2435750