In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Construction of centOS DNS domain name resolution service-forward resolution-basic overview-
The function of DNSX system in the network is to maintain an address database, which records the corresponding relationship between various host domain names and IP addresses, in order to provide forward or reverse address query services for client programs, that is, forward resolution and reverse resolution.
Forward resolution: look up the IP address according to the domain name, and resolve the specified domain name to the corresponding IP address. The forward resolution of domain name is the most basic function and the most commonly used function of DNS server. Reverse resolution: find the domain name according to the IP address, that is, the specified domain name is resolved to the corresponding IP address. Reverse resolution of domain names is not very common and can only be used in some special situations, such as anti-spam verification.
Common DNS types
1. Cached domain name server: only provides the caching function of domain name resolution results, in order to improve the query speed and efficiency, but does not have its own control of regional address data. When building a cached domain name server, you must set the root domain and specify another DNS server as the resolution source.
2. Primary domain name server: maintains the address database of a specific DNS region, has independent control over the resolution records in it, and is the only authoritative server and official server that exists in the specified region. When building the primary domain name server, you need to create the address data file that establishes the responsible area.
3. Slave domain name server: provides exactly the same DNS resolution server as the master domain name server, which is usually used for hot backup of DNS service. For the client, the query result is the same whether using the primary domain name server or the slave domain name server. The key difference is that the resolution results provided from the domain name server are not self-determined. It comes from the primary domain name server. When building a slave server, you need to specify the location of the primary domain name server so that the server can automatically synchronize the address database of the zone.
DNS TCP/UDP 53 port
DNS (Domain Name System, Domain name system), a distributed database on the World wide Web as a mapping between domain names and IP addresses, can make it more convenient for users to access the Internet without having to remember the IP strings that can be read directly by the machine. The process of getting the IP address corresponding to the domain name through the domain name is called domain name resolution (or hostname resolution). DNS protocol runs on top of UDP protocol, using port number 53.
-set up DNS domain name resolution service-
1. First of all, use the yum warehouse DNS service package in the networked state
[root@localhost ~] # yum install bind-y
2. Check what important configuration files are required for DNS domain name resolution service.
[root@localhost ~] # rpm-qc bind
3. Enter the main configuration file, modify the listening address in the main configuration file and the network segment that allows access to the DNS service, and then press wq to save it.
[root@localhost~] # vim / etc/named.conf
4. After modifying the main configuration file, the forward parsing also needs to modify the zone configuration file.
[root@localgost~] # vim / etc/named.rfc1912.zones
The main modifications are as follows
5. Go to the "/ var/named" directory and copy a "named.localhost" file named "kgc.com.zone".
[root@localhost ~] # cd / var/named/ [root@localhost named] # cp-p named.localhost kgc.com.zone
6. Modify the area data file
[root@localhost named] # vim kgc.com.zone (modify data configuration file)
* * $TTL 1D-// effectively parses the record's lifetime @ IN SOA kgc.com. Admin.kgc.com-/ / SOA tag, domain name, admin email 0; serial-# version serial number 1D; refresh-# survival address of invalid resolution record 1H; retry- # refresh time, 1W interval between re-downloading address data; expire-# expiration time, if the event is still unable to download, give up 3H) The minimum---# cache saves up to 3 hours the name of the NS kgc.com.---# server A 192.168.100.120 the address of the host server IN MX 10 mail.kgc.com. -- # Mail exchange record www IN A 192.168.100.99 Murray # host resolution address ftp IN A 192.168.100.88--#ftpsmtp IN CNAME www--# alias resolution * IN A 8.8.8.8-# pan domain name resolution * *
7. Turn off the firewall and enhanced security features, and then enable the DNS service
[root@localhost~] # systemctl stop firewalld.service [root@localhost~] # setenforce 0 [root@locailhost~] systemctl start named
8. Change the local DNS server IP address to your own IP address, and use your own DNS server to resolve the domain name. Check to see if the change was successful
Echo "nameserver 192.168.100.128" > / etc/resolv.confcat / etc/resolv.conf
-Resolution Domain name-
1. Use the host command to forward resolve the domain name
[root@localhost~] # host www.kgc.com [root@localhost~] # host smtp.kgc.com [root@localhost~] # host ftp.kgc.com [root@localhost~] # host abc.com
If you don't have the host command, you can install it using the command.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.