Preparation before erection:
To set up a DNS server, you must install a software program that provides DNS service, ie bind software, use The following command can be installed:
yum install -y bind-chroot bind-utis
1. Modify the main configuration file /etc/named.conf
This server The erection is relatively simple, that is, actually use this [so-called DNS server] as a proxy to perform querying DNS information upwards. In this environment, you only need to modify the main configuration file /etc/named.conf to modify it. As follows:
After the above configuration is completed, use the following command to start the DNS service:
/etc/init.d/named start
Remember Need to check after configuration:
Check the content of /var/log/messages (very important!)
tail -n 30 /var/log/messages |
Grep named
named Whether to start successfully Check the information in /var/log/messages!
According to the above steps, you can successfully set up a simple forwarding DNS server. Let's test the DNS server:
2.Test the availability of the forwarding DNS server
1) Method 1: Use the dig command to specify the DNS server address
[root@moban ~]# dig www.google.com @127.0.0.1
After using this command: If found Google's IP, and the words "SERVER:127.0.0.1#53(127.0.0.1)" are displayed at the bottom of the output data, which means it should be successful.
The picture is as follows:
The test is successful!
2) Method 2: Use the address of the built DNS server as the DNS server address on this machine
Test as follows:
You can see that the IP address of the domain name was successfully returned, indicating that the test was successful!
It is not difficult to forward the DNS server. Just modify the main configuration file /etc/named.conf and modify it to the above configuration.
Provide the advantages of the DNS server:
There is to be explained here, because the forwarding DNS server is to hand over the client's DNS request to the upper-level DNS server set by itself. To query the DNS, so as long as the primary DNS server is stable and responsive, the performance of our own DNS server can be greatly improved.
Disadvantages of forwarding DNS servers:
Because many public DNS servers are now intelligent DNS servers, as we have above 202.96.128.86 and 202.96.128.166, this means It can return the server IP list of the corresponding operator according to the type of the client's IP address (it is telecommunications, Netcom or mobile, etc.), so that the client can reach the fastest access speed. So there is a problem here, that is, the forwarding DNS server we set up, no matter what type of carrier is used by the client that uses the forwarding DNS server, the IP address obtained by these clients when querying the IP address of the domain name. It is the type of carrier corresponding to the forwarding DNS server, which affects the speed of the client that forwards the DNS server to the website to some extent (these clients are not using the same carrier when forwarding the DNS server), so the forwarding DNS is set up. Pay particular attention to this issue when working with servers.
Microsoft announced the extension of the Windows Vista and Windows 7 lifecycle. The life cycle of W
The Linux operating system has been around for 20 years without knowing it. Just 20 years ago, just
We know that both functions provide the ability to enter one line at a time. However, gets is a depr
According to the US technology blog TNW, the well-known Linux vendor Canonical today released and de
Linux (RedHat) network card, sound card configuration and installation entry
Teach you to make a USB boot disk for the Linux operating system
The meaning and difference between Linux chmod 755 and chmod 777
I don't know how to choose the advantages and disadvantages of various Linux distributions
Instance resolution: Linux system transparent firewall related settings
Network programming errors and processing under Linux
Linux programming common problems Daquan
Fedora 17 Chinese font display dot matrix solution
Linux setuid and setgid explain
IE11 browser upgrade notification on "monk" mode in win7
Windows 8 system personality theme download and installation
What if Win7 Bluetooth is disabled? Win7 Bluetooth is disabled. Solution
Win8 How to get permission to browse Windows backup VHD files
Quest dual mode: Windows 8 mode and Windows 7 mode
Win10 10049 can not start Hyper-V virtual machine reasons and solutions
How to remove the two-way blue arrow in the upper right corner of the Win10 folder?
How to copy the contents of the warning prompt dialog in Windows
How to use win10 system continuum mode? Win10 continuum use tutorial