redhat7.6 DNS configuration being analytical

1. Install the DNS Service

yum install bind

yum install bind-chroot

Installing the configuration file /etc/named.conf

Start systemctl start named.service

 

Configuring DNS

 The main configuration file /etc/named.conf //

This machine is configured to listen to all IP-53 port

All requests can be connected to the IP of the machine can be sent to the DNS query

 

 

/etc/named.rfc1912.zones // management domain name server configuration file, which defines the jurisdiction of which the domain name server

 

 

 

2.1. Forward resolution

Rhce01.com domain management

file "rhce01.com.zone" // This configuration file defaults to the / var / named / directory

 

After configuring the syntax check

named-checkzone  rhce01.com  rhce01.com.zone    

The picture is normal syntax check

 

 

 verification

nslookup domain name server IP // if the latter domain name without domain name server IP will automatically parse the public network, here is an unregistered domain names can not be resolved directly

 

 

ping test

Here tests need to modify the configuration file /etc/resolv.conf

This domain name // dig view the configuration is normal

 

 

2.2 reverse lookup

file "192.168.72.zone" // This configuration file defaults to the / var / named / directory

 Reverse analysis dig

you -x 192.168.72.129

 

The domain alias

Set test2.rhce01.com. Point to test == test.rhce01.com

Configuration Note, com back there.

 

 

Here is the apache service configuration 192.168.72.130

 There is no test2.rhce01.com this virtual host

 The following use 192.168.72.130 to access the test three domain names point to test.rhce01.com

 

 

 

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/MOMING95/p/11900630.html