准备工作(假设名称为bigcloud.local)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
NETWORKING= yes
HOSTNAME=bigcloud. local
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.188.135 bigcloud bigcloud.localdomain
添加如下
DNS1=192.168.188.11
DNS2=192.168.188.12
DOMAIN=bigcloud. local
安装bind
rpm -Uvh bind-9.9.4-14.el7.x86_64.rpm
|
|
开始配置服务器
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
Redirecting to /bin/systemctl start named.service
options {
//listen-on port 53 { 127.0.0.1; };
listen-on port 53 { any; };
//dnssec-enable yes ;
dnssec- enable no;
//dnssec-validation yes ;
dnssec-validation no;
dnssec-lookaside auto;
//allow-query { localhost; };
allow-query { any; };
allow-transfer { 192.168.188.11; 192.168.188.12; };
forwarders {202.102.224.68; 202.102.227.68; };
};
// LEAUS Add 添加正向ZONE
zone "bigcloud.local" IN {
type master;
file "bigcloud.zone" ;
};
// 添加反向ZONE
zone "0.0.10.in-addr.arpa" IN {
type master;
file "10.0.0.zone" ;
};
$TTL 3H
@ IN SOA zzsrv1.bigcloud. local . rname.invalid. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS zzsrv1.bigcloud. local .
zzsrv1 A 192.168.188.11
zzsrv2 A 192.168.188.12
ftp A 192.168.188.11
mailsrv1 A 192.168.188.22
www A 192.168.188.11
crm A 192.168.188.11
smtp CNAME mailsrv1.bigcloud. local .
pop3 CNAME mailsrv1.bigcloud. local .
反向ZONE文件
$TTL 3H
@ INSOA zzsrv1.bigcloud. local . tom_chen.126.com (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H) ; minimum
IN NS zzsrv1.bigcloud. local .
IN NS zzsrv2.bigcloud. local .
11 IN PTR zzsrv1.bigcloud. local .
11 IN PTR ftp .bigcloud. local .
12 IN PTR zzsrv2.bigcloud. local .
12 IN PTR mailsrv1.bigcloud. local .
设置为自动启动
|
|
测试
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
> server192.168.188.11
Default server: 192.168.188.11
Address: 192.168.188.11
>www.bigcloud. local .
Server: 192.168.188.11
Address: 192.168.188.11
Name: www.bigcloud. local
Address: 192.168.188.11
>smtp.bigcloud. local .
Server: 192.168.188.11
Address: 192.168.188.11
smtp.bigcloud. local canonical name = mailsrv1.bigcloud. local .
Name: mailsrv1.bigcloud. local
Address: 192.168.188.22
>192.168.188.11
Server: 192.168.188.11
Address: 192.168.188.11
11.188.168.192. in -addr.arpa name = ftp .bigcloud. local .
11.188.168.192. in -addr.arpa name = zzsrv1.bigcloud. local .
> exit
|
|
本文出自 “李豪” 博客,请务必保留此出处http://leaus.blog.51cto.com/9273485/1540310