1.DNS classification system
Caching name server: increase speed, cache recording, no parsing
Primary DNS Server: Set up the data file, with the analytic function
Data synchronization primary domain name server: from domain name server
Forwarder
2. analytically
Forward Analysis: According DNS IP
Reverse Analysis: According to resolve the domain name IP
3. The domain structure
Host name second-level domain. Top-level domain.
Secondary domain name server for the domain (zone)
Preparing 4. Configure
# Turn off the firewall and security mechanisms
systemctl stop firewalld
iptables -F
setenforce 0
# Yum warehouse building
mount /dev/sr0 /media/
mv C* a/
vim /etc/yum.repod/local.repo
yum clean all
#yum makecache
BIND installation package
bind: to provide domain name services main proceedings and related documents
bind-utils: provides a test utility of the DNS server
bind-libs: libraries provide functionality
5. Process client's domain name resolution
Browser cache -> hosts file -> Local DNS - "."> Root
-.> Com .--> secondary domain .com .--> record corresponding to the host
LDNS cache -> returned to the client
6. Build caching name server
# Modify the main configuration file
vim /etc/named.conf reserved items:
options {
listen-on port 53 {} IP address of the server;
directory "/var/named";
dump-file "/var/...";
statistics-file "/var/...";
memstatistics-file "/var/...";
allow-query {subnet address;};
recursion yes;
};
zone "." IN {
type hint;
file "named.ca";
};
7. Construction of the primary domain name server
# Specify the DNS server address
vim /etc/resolv.conf
nameserver 1
nameserver 2
# Parse growth, write hosts file
vim /etc/hosts
Domain name server IP 1 1
Domain name server IP 2 2
# Modify the main configuration file
vim /etc/named.conf
Global Configuration: options {
directroy "/var.named";
};
zone "second level domain .com" IN {
type master; (server type)
file "secondary domain name .zheng"; (forward parse the file, / var / named / under)
from the server allow-transfer {IP}; (to allow download from the server)
# Create a zone data file
cd / var / named /
vim "second-level domain" .zheng
$TTL 86400
@ IN SOA authorized domain name .com. Domain administrator .com. (
Update sequence number (any number less than 10)
3H (updated every 3 hours)
15M (If the download fails, every 15 minutes to download again)
1W (a week, if the download has failed, do not download)
1D (Invalid resolution records retention time of 1 day)
)
IN NS authoritative name
IN MX 10 mail domain
Hostname IN A IP address
8. Domain analytical separation
# Prepare two cards
Analog two networks (intranet and extranet)
# Modify the main configuration file
vim /etc/named.conf
options {
directory “/var/named”;
};
include “/etc/named/lan.txt”;
include “/etc/named/wan.txt”;
view "LAN" {
match -clients{lan;};
zone "domain .com" IN {
type master;
file "domain name .zheng.lan"
};
};