DNS resolve separate experiments
Experimental topology
This experiment we are no longer on the website set up, as long as LAN and WAN from the server to resolve the domain name can be.
DNS resolution first of all we want to install a bind package.
Our servers are connected to a local area network and wide area network, so we need to give the virtual machine together with a piece of card and the two card mode into a host-only mode.
The need to restart the server NIC NIC take effect after the installation is complete, then we can look to the system already has a second network card ens37.
NIC addition was complete, we just need to configure the card, first ens33 card set as follows.
Although we add a virtual machine to a new card, but the arrangement was not added to it, so we also need a copy of ens33 configuration file and modify as ens37 profile.
In the ens37 profile All ens33 changed ens37, and delete the UUID entire line. And to configure its IP address and subnet mask.
NIC configured, you must remember to re restart the network services, configuration changes to take effect.
Here we also need to use the command "ifconfig" to see the IP address of the network card configuration is in effect.
Gateway server's configuration is complete, we also need to configure the IP address of the WAN and LAN clients.
After configuration, we have to ensure that local and wide area network to communicate with the gateway server.
IP gateway is configured to perform the following we need to configure the DNS. We first enter the primary DNS configuration file is modified.
In the main configuration file, we will listen address and resolve permissions changed to allow any.
Here we enter the zone configuration file with the following modifications.
After we enter the main configuration file copy the following into zone configuration file and delete the content in the main configuration file.
Copied the contents of the main configuration folder and then add the following below.
Here's what we modify the configuration of the zone data file, because the area where we make our own data profiles defined, so we need to copy the template and modify it.
Performing the following configurations in the region of the profile data.
Because of our servers to a website resolves to LAN and WAN, so we have to copy the data to the region again and modify.
Let follows regional data configuration file.
Here all of our configuration file has been configured, let's start to be named services and view their status. For the normal operation of the services we need to turn off the firewall and enhanced security features.
Here is the validation of experimental results, in the LAN and WAN, we can resolve to two different IP addresses for the same domain name.