0 5 min 1 week

  Preface:online casino cheats and The latest entrance

  Basic of BIND domain name service

  The role and type of DNS system, the installation and configuration file of BIND, using BIND to build domain name servers

  Build cache domain name server, build master and slave domain name servers

  Key steps: find the main configuration file, find the startup script

  IP resolves domain names, mostly used for testing

  Insert image description here

  www.sina.com.cn. The last point is the root, and the whole is a fully qualified domain name

  www is the host name, sina is the second-level domain, com.cn is the top-level domain, . is the root

  Also known as a caching server, it caches the domain->IP address records obtained by querying other domain name servers locally, improving the speed of repeated queries

  It is the cache server when the service is installed

  Master server is the official server of a specific DNS zone, with uniqueness responsible for maintaining all domain->IP address mapping records within the zone

  Slave server, also known as auxiliary domain name server, maintains the domain->IP address records, derived from the primary domain name server

  BIND (Berkeley Internet Name Daemon)

  Berkeley Internet Domain Service, related software packages

  bind-9.9.4-37.el7.x86_64.rpm, bind-untils-9.9.4-37.el7.x86_64.rpm, bind-libs-9.9.4-37.el7.x86_64.rpm, bind-chroot-9.9.4-37.el7.x86_64.rpm

  Main executable program: /usr/sbin/named, default listening port: 53, TCP is responsible for connection control, UDP is responsible for fast resolution, the main configuration file: /etc/bind/named.conf, the data file saving DNS resolution records is located at /var/named/

  Global configuration part

  Global parameters of the DNS server, including listening address/port, default location of data files, etc., using the configuration section of options { … };

  Part of the zone configuration /etc/named.rfc1912.zonesonline casino method and The latest plan

  The specific DNS domain that this server provides domain resolution includes domain name, server role, data file name, etc., using the configuration section of zone “zone name” IN { … };

  16.16.173.in-addr.arpa is the reverse of an IP address, the positive writing is ‘173.16.16.?’, ‘?’ as an option

  3.4.1 Global TTL configuration item and SOA record under the /var/named/ directory

  $TTL (Time To Live, Survival Time) records the SOA (Start of Authority, Authority Information Start) record, the part starting with the semicolon ‘;’ is for comment information

  If the primary server cannot be found, it will look for it every 1 hour, and continue for 1w, that is, one week

  3.4.2 Domain resolution record

  NS domain name server (Name Server) record MX mail exchange (Mail Exchange) record A address (address) record, only used in the forward resolution zone CNAME alias (Canonical Name) record

  The boundary of the ipv6 reverse resolution zone is the forward resolution zone above, and the reverse resolution zone below

  @ represents a variable, here referring to the domain name

  At this point, the DNS forward resolution has been configured

  Verify

  Create a new virtual machine, set the network card mode to nat mode, and then specify the dns

  Insert image description here

  3.6.1 Domain resolution record

  PTR pointer (Point) record, only used to record the host part of the specified IP address in the first column of the reverse resolution zone

  Reverse resolution zone data file configuration

  Test with nslookup or host

  3.7.1 Load balancing based on domain resolution

  The same domain corresponds to multiple IP addresses

  3.7.2 Wildcard domain resolution

  Use ‘*’ for matching when an exact A record cannot be found

  Verify that the same domain corresponds to multiple IP addresses

  3.8.1 named-checkconf tool

  No reaction, because it is running normally, I will change the data inside to verify

  Correct the error

  -z option will also check if there are any errors in the zone items

  Without the -z option, only the overall syntax is checked

  3.8.2 named-checkzone tool

  Insert image description here

  Insert image description here

  Insert image description here

  Insert image description here

  Insert image description here

  Insert image description here

  Insert image description here

  Insert image description here

  Insert image description here

  Insert image description here

  Insert image description here

  Insert image description here

  Slave from server

  First turn off the firewall

  Main configuration file /etc/bind/named.conf

  Data file /var/named

  Program /usr/sbin/named

  Copy with permission using the named.localhost template, and change the name to the name of the file parameter in the zone configuration file

  nslookup can be used to check

  You can enter the dns server hostname in the /etc/hosts and /etc/resolv.conf files

  And confirm, used for quick access to dns address

  @ IN NS ns1.bdqn.com.

  IN MX 10 mail.bdqn.com.download lottery download and The latest method

  mail IN A 173.16.16.4

  ns1 IN A 58.119.74.203

  ftp IN CNAME www

  www IN A 173.16.16.1