DNS tries to
DNS attempted to: Resolve a domain name to a different address in 2. Clients that implement many different carriers have quick access to the site. As a cache server. When the customer requests, according to the customer IP to determine the resolution of that server address
allow-recursion {}; Specifies that a network segment is recursive
Allow-query {}; only who is allowed to query
Allow-transfer {}; Specifies that a network segment can be routed
Sxfr
Ixfr
If there are multiple network segments at the same time. ACLs can be defined. function functions in a similar script, generally defined before options
allow-query {172.16.0.0/16; 127.0.0.0/8; 10.0.0.0/8;};
ACL Innet {
172.16.0.0/16;
127.0.0.0/8;
10.0.0.0/8;
}
allow-query {innet;};
none; all the
any;
------------------------------------------
View View_name {
};
View View_name {
};
All areas must be defined in the attempt
Vi/etc/named.conf
ACL innet {define ACL
127.0.0.0/8;
192.168.10.0/24;
};
Options {
Directory "/var/named";
allow-recursion {innet;}; Allow only Cal address recursion
};
View Telecom {
match-clients {innet;}; The address inside the ACL uses this view
Zone "Mylinux.com" in {
Type master; Define as the primary server
File "Telecom.mylinux.com.zone";
};
};
View Unicom {
match-clients {any;}; This view is used by any other address
Zone "Mylinux.com" in {
Type master;
File "Unicom.mylinux.com.zone";
};
};
[Email protected] named]# cd/var/named
[Email protected] named]# vim Telecom.mylinux.com.zone
$TTL 3333
@ in SOA ns1.mylinux.com. Admin.mylinux.com. (
2016071001
1H
5M
1D
3H
)
In NS ns1
In MX 8 mail
NS1 in A 192.168.10.2
Mail in A 192.168.10.100
www in A 192.168.10.3
[Email protected] named]# chmod 640 Telecom.mylinux.com.zone
[Email protected] named]# chown root:named telecom.mylinux.com.zone
[email protected] named]# CP Telecom.mylinux.com.zone unicom.mylinux.com.zone-p
[Email protected] named]# vim Unicom.mylinux.com.zone
$TTL 3333
@ in SOA ns1.mylinux.com. Admin.mylinux.com. (
2016071001
1H
5M
1D
3H
)
In NS ns1
In MX 8 mail
NS1 in A 192.168.10.2 are the same DNS server so ns1 unchanged
Mail in A 172.168.10.10
www in A 172.168.10.30 ACL address All Access this website address
-------------------------------------------------------------------
The same is true if you need host parsing from the a.net domain. Whenever a domain data file and domain definition is provided, no matter how many domains can be resolved on a single host
[Email protected] named]# vim/etc/named.conf
allow-recursion {innet;};
};
View Telecom {
match-clients {innet;};
Zone "Mylinux.com" in {
Type master;
File "Telecom.mylinux.com.zone";
};
Zone "a.NET" in {Add a new domain file
Type master;
File "A.net.zone";
};
};
View Unicom {
match-clients {any;};
Zone "Mylinux.com" in {
Type master;
File "Unicom.mylinux.com.zone";
};
Zone "a.NET" in {Add a new domain file
Type master;
File "A.net.zone";
};
};
[Email protected] named]# vim A.net.zone
$TTL 4000
@ in SOA ns1.a.net. Admin.a.net. (
20160710
1H
5M
1D
5H
)
In NS ns1
NS1 in A 192.168.10.2
www in A 192.168.10.100
[Email protected] named]# chmod 640 A.net.zone
[Email protected] named]# chown root:named a.net.zone
This article from "Linux operation and Maintenance" blog, declined reprint!
DNS tries to