我的编程空间,编程开发者的网络收藏夹
学习永远不晚

bind杂记(3)

短信预约 -IT技能 免费直播动态提醒
省份

北京

  • 北京
  • 上海
  • 天津
  • 重庆
  • 河北
  • 山东
  • 辽宁
  • 黑龙江
  • 吉林
  • 甘肃
  • 青海
  • 河南
  • 江苏
  • 湖北
  • 湖南
  • 江西
  • 浙江
  • 广东
  • 云南
  • 福建
  • 海南
  • 山西
  • 四川
  • 陕西
  • 贵州
  • 安徽
  • 广西
  • 内蒙
  • 西藏
  • 新疆
  • 宁夏
  • 兵团
手机号立即预约

请填写图片验证码后获取短信验证码

看不清楚,换张图片

免费获取短信验证码

bind杂记(3)

回顾

配置成缓存名称服务器

[root@www ~]# vim /etc/named.conf

//

options {
        //listen-on port 53 { 10.201.106.129; };
        
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        //allow-query     { any; };
        recursion yes;

        
};

查看DNS的TCP和UDP端口是否开启

[root@www ~]# ss -tuln | grep :53
udp    UNCONN     0      0         10.201.106.129:53                    *:*     
udp    UNCONN     0      0              127.0.0.1:53                    *:*     
tcp    LISTEN     0      3         10.201.106.129:53                    *:*     
tcp    LISTEN     0      3              127.0.0.1:53                    *:*     
tcp    LISTEN     0      128                   :::53835                :::*     

定义正向和反向区域文件

vim /etc/named.rfc1912.conf
zone "magedu.com" IN {
        type master;
        file "magedu.com.zone";
};

zone "106.201.10.in-addr.arpa" IN {
        type master;
        file "10.201.106.zone";
};

重载服务
[root@www ~]# rndc reload
server reload successful

[root@www ~]# rndc reload
server reload successful
[root@www ~]# rndc status
version: 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6
CPUs found: 1
worker threads: 1
number of zones: 21
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/0/1000
tcp clients: 0/100
server is up and running

[root@www ~]# tail /var/log/messages
Aug  3 13:39:42 qq named[19186]: error (network unreachable) resolving './DNSKEY/IN': 2001:503:c27::2:30#53
Aug  3 13:39:42 qq named[19186]: error (network unreachable) resolving './DNSKEY/IN': 2001:7fe::53#53
Aug  3 13:39:53 qq named[19186]: received control channel command 'reload'
Aug  3 13:39:53 qq named[19186]: loading configuration from '/etc/named.conf'
Aug  3 13:39:53 qq named[19186]: using default UDP/IPv4 port range: [1024, 65535]
Aug  3 13:39:53 qq named[19186]: using default UDP/IPv6 port range: [1024, 65535]
Aug  3 13:39:53 qq named[19186]: sizing zone task pool based on 8 zones
Aug  3 13:39:54 qq named[19186]: Warning: 'empty-zones-enable/disable-empty-zone' not set: disabling RFC 1918 empty zones
Aug  3 13:39:54 qq named[19186]: reloading configuration succeeded
Aug  3 13:39:54 qq named[19186]: reloading zones succeeded

创建正向区域解析库文件

[root@www named]# vim zz.com.zone 

$TTL 1D
$ORIGIN zz.com.
@       IN      SOA     ns1.zz.com. admin.zz.com. (
                        2016042501
                        1H
                        5M
                        3D
                        1D )
        IN      NS      ns1
        IN      NS      ns2
ns1     IN      A       10.201.106.129
ns2     IN      A       10.201.106.128
www     IN      A       10.201.106.129
*       IN      A       10.201.106.129

[root@www named]# named-checkzone "zz.com" /var/named/zz.com.zone 
zone zz.com/IN: loaded serial 2016042501
OK

更改区域记录文件权限

[root@www named]# chmod 640 zz.com.zone 
[root@www named]# chown :named zz.com.zone 
[root@www named]# ll zz.com.zone 
-rw-r----- 1 root named 217 Aug  3 14:09 zz.com.zone

重新加载named

[root@www named]# rndc reload
server reload successful
[root@www named]# tail /var/log/messages
Aug  3 14:14:07 qq named[19186]: received control channel command 'reload'
Aug  3 14:14:07 qq named[19186]: loading configuration from '/etc/named.conf'
Aug  3 14:14:07 qq named[19186]: using default UDP/IPv4 port range: [1024, 65535]
Aug  3 14:14:07 qq named[19186]: using default UDP/IPv6 port range: [1024, 65535]
Aug  3 14:14:07 qq named[19186]: sizing zone task pool based on 9 zones
Aug  3 14:14:07 qq named[19186]: Warning: 'empty-zones-enable/disable-empty-zone' not set: disabling RFC 1918 empty zones
Aug  3 14:14:07 qq named[19186]: reloading configuration succeeded
Aug  3 14:14:07 qq named[19186]: zone zz.com/IN: loaded serial 2016042501
Aug  3 14:14:07 qq named[19186]: reloading zones succeeded
Aug  3 14:14:07 qq named[19186]: zone zz.com/IN: sending notifies (serial 2016042501)

记录测试

[root@www named]# dig -t A www.zz.com @10.201.106.129

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6 <<>> -t A www.zz.com @10.201.106.129
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3270
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;www.zz.com.            IN  A

;; ANSWER SECTION:
www.zz.com.     86400   IN  A   10.201.106.129

;; AUTHORITY SECTION:
zz.com.         86400   IN  NS  ns2.zz.com.
zz.com.         86400   IN  NS  ns1.zz.com.

泛域名解析
[root@www named]# dig -t A ftp.zz.com @10.201.106.129

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6 <<>> -t A ftp.zz.com @10.201.106.129
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4797
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;ftp.zz.com.            IN  A

;; ANSWER SECTION:
ftp.zz.com.     86400   IN  A   10.201.106.129

;; AUTHORITY SECTION:
zz.com.         86400   IN  NS  ns2.zz.com.
zz.com.         86400   IN  NS  ns1.zz.com.

子域授权

在区域解析库创建子域

[root@www named]# vim zz.com.zone 

$TTL 1D
$ORIGIN zz.com.
@       IN      SOA     ns1.zz.com. admin.zz.com. (
                        2016042501
                        1H
                        5M
                        3D
                        1D )
        IN      NS      ns1
        IN      NS      ns2
ns1     IN      A       10.201.106.129
ns2     IN      A       10.201.106.128
www     IN      A       10.201.106.129
*       IN      A       10.201.106.129

ops     IN      NS      ns1.ops         ##子域定义
ops     IN      NS      ns2.ops         ##子域定义
ns1.ops IN      A       10.201.106.128  ##子域定义
ns2.ops IN      A       10.201.106.131  ##子域定义

重载后区域数不会发生改变

[root@www named]# 
[root@www named]# rndc status
version: 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6
CPUs found: 1
worker threads: 1
number of zones: 22
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/0/1000
tcp clients: 0/100
server is up and running
[root@www named]# 
[root@www named]# rndc reload
server reload successful
[root@www named]# 
[root@www named]# rndc status
version: 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6
CPUs found: 1
worker threads: 1
number of zones: 22
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/0/1000
tcp clients: 0/100
server is up and running
[root@www named]# 

配置子域服务器

也是将子域服务器配置成缓存服务器,/etc/named.conf

定义子域区域

[root@zz ~]# vim /etc/named.rfc1912.zones 
 55 zone "ops.zz.com" IN {
 56         type master;
 57         file "ops.zz.com";
 58 };

重载后已经增加了一个区域

[root@zz ~]# rndc status
version: 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6
CPUs found: 1
worker threads: 1
number of zones: 21
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/0/1000
tcp clients: 0/100
server is up and running
[root@zz ~]# 
[root@zz ~]# rndc reload
server reload successful
[root@zz ~]# rndc status
version: 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6
CPUs found: 1
worker threads: 1
number of zones: 22
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/0/1000
tcp clients: 0/100
server is up and running
[root@zz ~]# 

编辑子正向域区域解析库文件

[root@zz named]# vim ops.zz.com.zone

  1 $TTl 1d
  2 $ORIGIN ops.zz.com.
  3 @       IN      SOA     ns1.ops.zz.com. admin.ops.zz.com. (
  4                         2015042501
  5                         1H
  6                         10M
  7                         3D
  8                         1D )
  9         IN      NS      ns1
 10         IN      NS      ns2
 11 ns1     IN      A       10.201.106.128
 12 ns2     IN      A       10.201.106.131
 13 www     IN      A       10.201.106.200
 14 *       IN      A       10.201.106.200

[root@zz named]# named-checkzone "ops.zz.com" /var/named/ops.zz.com.zone 
zone ops.zz.com/IN: loaded serial 2015042501
OK
[root@zz named]# vim ops.zz.com.zone

[root@zz named]# tail /var/log/messages
Jul 29 18:39:35 zz named[2524]: loading configuration from '/etc/named.conf'
Jul 29 18:39:35 zz named[2524]: using default UDP/IPv4 port range: [1024, 65535]
Jul 29 18:39:35 zz named[2524]: using default UDP/IPv6 port range: [1024, 65535]
Jul 29 18:39:35 zz named[2524]: sizing zone task pool based on 9 zones
Jul 29 18:39:36 zz named[2524]: Warning: 'empty-zones-enable/disable-empty-zone' not set: disabling RFC 1918 empty zones
Jul 29 18:39:36 zz named[2524]: zone ops.zz.com/IN: (master) removed
Jul 29 18:39:36 zz named[2524]: reloading configuration succeeded
Jul 29 18:39:36 zz named[2524]: zone ops.zz.com/IN: loaded serial 2015042501
Jul 29 18:39:36 zz named[2524]: reloading zones succeeded
Jul 29 18:39:36 zz named[2524]: zone ops.zz.com/IN: sending notifies (serial 2015042501)

修改权限
[root@zz named]# chgrp named ops.zz.com.zone 
[root@zz named]# ll ops.zz.com.zone 
-rw-r-----. 1 root named 232 Jul 29 21:29 ops.zz.com.zone
[root@zz named]# 

[root@zz named]# dig -t NS ops.zz.com @10.201.106.128

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6 <<>> -t NS ops.zz.com @10.201.106.128
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12464
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 2

;; QUESTION SECTION:
;ops.zz.com.            IN  NS

;; ANSWER SECTION:
ops.zz.com.     86400   IN  NS  ns2.ops.zz.com.
ops.zz.com.     86400   IN  NS  ns1.ops.zz.com.

测试子域服务器解析

[root@zz named]# dig -t A www.ops.zz.com @10.201.106.128

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6 <<>> -t A www.ops.zz.com @10.201.106.128
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17382
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;www.ops.zz.com.            IN  A

;; ANSWER SECTION:
www.ops.zz.com.     86400   IN  A   10.201.106.200

;; AUTHORITY SECTION:
ops.zz.com.     86400   IN  NS  ns1.ops.zz.com.
ops.zz.com.     86400   IN  NS  ns2.ops.zz.com.

父域测试子域

[root@www named]# dig -t NS ops.zz.com @10.201.106.129 +norecurse

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6 <<>> -t NS ops.zz.com @10.201.106.129 +norecurse
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42676
;; flags: qr ra; QUERY: 1, ANSWER: 0, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;ops.zz.com. IN NS

;; AUTHORITY SECTION:
ops.zz.com. 86400 IN NS ns1.ops.zz.com.
ops.zz.com. 86400 IN NS ns2.ops.zz.com.

;; ADDITIONAL SECTION:
ns1.ops.zz.com. 86400 IN A 10.201.106.128
ns2.ops.zz.com. 86400 IN A 10.201.106.131

解决问题:

定义转发域

父域配置(全局转发)

vim /etc/name.conf
options {
        listen-on port 53 { 10.201.106.128;127.0.0.1; };
        //listen-on-v6 port 53 { ::1; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        allow-query     { any; };
        recursion yes;
        forward first;                  ***
        forwarder { 10.201.106.2; };    ***

子域(区域转发),配置子域对zz.com的解析都转发给主服务器解析;

vim /etc/named.rfc1912.conf

zone "zz.com" IN {
        type forward;
        forward only;
        forwarders { 10.201.106.129; };
};

测试:在子域解析父域的域名
[root@zz ~]# dig -t A www.magedu.com @10.201.106.128

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6 <<>> -t A www.magedu.com @10.201.106.128
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39821
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;www.magedu.com.            IN  A

;; ANSWER SECTION:
www.magedu.com.     86400   IN  A   10.201.106.129
www.magedu.com.     86400   IN  A   10.201.106.128

测试:在父域测试子域的域名
[root@qq ~]# dig -t A ns1.ops.zz.com @10.201.106.129

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6 <<>> -t A ns1.ops.zz.com @10.201.106.129
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13781
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1

;; QUESTION SECTION:
;ns1.ops.zz.com.            IN  A

;; ANSWER SECTION:
ns1.ops.zz.com.     86400   IN  A   10.201.106.128

将子域的转发区域测试,将不能解析父域 ###、

将转发域注释掉(/etc/named.rfc1912.conf)
[root@zz ~]# dig -t A www.zz.com @10.201.106.128

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6 <<>> -t A www.zz.com @10.201.106.128
;; global options: +cmd
;; Got answer:

查看防火墙是否打开

[root@zz ~]# iptables -L -n
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
[root@zz ~]# 

清空缓存
rndc flsuh

区域解析优先级大于全局解析

当子域服务器同时配置区域和全局解析配置时,解析内网的域名时找父域服务器,解析外网的域名时找外网DNS服务器;

配置:
全局解析配置:
[root@zz ~]# vim /etc/named.conf
forward first;
forwarders { 10.201.106.2; };
区域解析配置:
[root@zz ~]# vim /etc/named.rfc1912.zones 

zone "zz.com" IN {
        type forward;
        forward only;
        forwarders { 10.201.106.129; };
};

测试验证:
[root@zz ~]# dig -t A www.baidu.com @10.201.106.128

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6 <<>> -t A www.baidu.com @10.201.106.128
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27032
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 13, ADDITIONAL: 10

;; QUESTION SECTION:
;www.baidu.com.         IN  A

;; ANSWER SECTION:
www.baidu.com.      5   IN  CNAME   www.a.shifen.com.
www.a.shifen.com.   5   IN  A   111.13.100.91
www.a.shifen.com.   5   IN  A   111.13.100.92

;; AUTHORITY SECTION:
.           5   IN  NS  e.root-servers.net.
.           5   IN  NS  f.root-servers.net.
.           5   IN  NS  h.root-servers.net.
.           5   IN  NS  g.root-servers.net.
.           5   IN  NS  d.root-servers.net.
.           5   IN  NS  i.root-servers.net.
.           5   IN  NS  c.root-servers.net.
.           5   IN  NS  l.root-servers.net.
.           5   IN  NS  a.root-servers.net.
.           5   IN  NS  j.root-servers.net.
.           5   IN  NS  k.root-servers.net.
.           5   IN  NS  b.root-servers.net.
.           5   IN  NS  m.root-servers.net.

;; ADDITIONAL SECTION:
h.root-servers.net. 5   IN  A   198.97.190.53
j.root-servers.net. 5   IN  A   192.58.128.30
j.root-servers.net. 5   IN  AAAA    2001:503:c27::2:30
e.root-servers.net. 5   IN  A   192.203.230.10
a.root-servers.net. 5   IN  A   198.41.0.4
a.root-servers.net. 5   IN  AAAA    2001:503:ba3e::2:30
k.root-servers.net. 5   IN  A   193.0.14.129
k.root-servers.net. 5   IN  AAAA    2001:7fd::1
d.root-servers.net. 5   IN  A   199.7.91.13
d.root-servers.net. 5   IN  AAAA    2001:500:2d::d

;; Query time: 12 msec
;; SERVER: 10.201.106.128#53(10.201.106.128)
;; WHEN: Fri Jul 29 23:41:15 2016
;; MSG SIZE  rcvd: 509

[root@zz ~]# dig -t A www.zz.com @10.201.106.128

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6 <<>> -t A www.zz.com @10.201.106.128
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6758
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;www.zz.com.            IN  A

;; ANSWER SECTION:
www.zz.com.     85785   IN  A   10.201.106.129

;; AUTHORITY SECTION:
zz.com.         85770   IN  NS  ns1.zz.com.
zz.com.         85770   IN  NS  ns2.zz.com.

;; ADDITIONAL SECTION:
ns2.zz.com.     85770   IN  A   10.201.106.128
ns1.zz.com.     85770   IN  A   10.201.106.129

;; Query time: 1 msec
;; SERVER: 10.201.106.128#53(10.201.106.128)
;; WHEN: Fri Jul 29 23:41:27 2016
;; MSG SIZE  rcvd: 112

如果失败失败,可以看下named.conf里的一些安全配置改为no,两边服务器的安全配置都需要一模一样,不能一边项关闭,一边项注释;

bind的基础安全配置

acl的定义

[root@qq ~]# vim /etc/named.conf

acl slaves {
    10.201.106.129;
    127.0.0.1
};

只需要特定主机查询主域服务器的解析困

如果不在白名单,就算是自己服务器的其它IP也无法查询
/etc/named.rfc1912.conf
zone "zz.com" IN {
        type master;
        file "zz.com.zone";
        allow-query { 10.201.106.129; };

};

换成any,任意主机都可以查询;
zone "zz.com" IN {
    type master;
    file "zz.com.zone";
    allow-query { any; };

};
子域发起查询主域名
[root@zz ~]# dig -t A www.zz.com @10.201.106.129

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6 <<>> -t A www.zz.com @10.201.106.129
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3007
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;www.zz.com.            IN  A

;; ANSWER SECTION:
www.zz.com.     86400   IN  A   10.201.106.129

;; AUTHORITY SECTION:
zz.com.         86400   IN  NS  ns1.zz.com.
zz.com.         86400   IN  NS  ns2.zz.com.

只需许主域本机区域传送

未配置前子域可以从主域区域传送:
[root@zz ~]# dig -t AXFR zz.com @10.201.106.129

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6 <<>> -t AXFR zz.com @10.201.106.129
;; global options: +cmd
zz.com.         86400   IN  SOA ns1.zz.com. admin.zz.com. 2016042501 3600 300 259200 86400
zz.com.         86400   IN  NS  ns1.zz.com.
zz.com.         86400   IN  NS  ns2.zz.com.
*.zz.com.       86400   IN  A   10.201.106.129
ns1.zz.com.     86400   IN  A   10.201.106.129
ns2.zz.com.     86400   IN  A   10.201.106.128
ops.zz.com.     86400   IN  NS  ns1.ops.zz.com.
ns1.ops.zz.com.     86400   IN  A   10.201.106.128
www.zz.com.     86400   IN  A   10.201.106.129
zz.com.         86400   IN  SOA ns1.zz.com. admin.zz.c

主机配置/etc/named.rfc1912.conf进行限制
zone "zz.com" IN {
        type master;
        file "zz.com.zone";
        allow-query { any; };
        allow-transfer { 10.201.106.129; };

};

子域再测试,不能再传送了:
[root@zz ~]# dig -t AXFR zz.com @10.201.106.129

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6 <<>> -t AXFR zz.com @10.201.106.129
;; global options: +cmd
; Transfer failed.

主域可以正常传送区域
[root@qq ~]# dig -t AXFR zz.com @10.201.106.129

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6 <<>> -t AXFR zz.com @10.201.106.129
;; global options: +cmd
zz.com.         86400   IN  SOA ns1.zz.com. admin.zz.com. 2016042501 3600 300 259200 86400
zz.com.         86400   IN  NS  ns1.zz.com.
zz.com.         86400   IN  NS  ns2.zz.com.
*.zz.com.       86400   IN  A   10.201.106.129
ns1.zz.com.     86400   IN  A   10.201.106.129
ns2.zz.com.     86400   IN  A   10.201.106.128
ops.zz.com.     86400   IN  NS  ns1.ops.zz.com.
ns1.ops.zz.com.     86400   IN  A   10.201.106.128
www.zz.com.     86400   IN  A   10.201.106.129
zz.com.         86400   IN  SOA ns1.zz.com. admin.zz.com. 2016042501 3600 300 259200 86400
;; Query time: 2 msec
;; SERVER: 10.201.106.129#53(10.201.106.129)
;; WHEN: Wed Aug  3 20:33:43 2016
;; XFR size: 10 records (messages 1, bytes 246)

允许哪些主机递归

/etc/named.confg
allow-recursion { ip; };

禁止更新区域数据库中的内容

zone "zz.com" IN {
        type master;
        file "zz.com.zone";
        allow-update { none; };

};

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

bind杂记(3)

下载Word文档到电脑,方便收藏和打印~

下载Word文档

猜你喜欢

bind杂记(3)

回顾配置成缓存名称服务器[root@www ~]# vim /etc/named.conf//options { //listen-on port 53 { 10.201.106.129; }; /* liste
2023-01-31

xen杂记(3)

1、准备1.1 下载光盘的两个文件下在光盘镜像 isolinux目录下的两个文件[root@node1 ~]# lltotal 40228drwxr-xr-x 35 root root 4096 Sep 11 08:39 busyb
2023-01-31

读书杂记Head first EJB(3)

今天书要还了,最后总结一下实体bean。实体bean中除了要放来自home及组件接口的方法和来自EntityBean接口方法外,还有一样:虚持久字段。这个到时会和部署文件有关联。实体bean很大的不同点在于实体bean的create() 及
2023-06-03

Python杂记

Python 2.7先装easy installhttps://pypi.python.org/pypi/setuptools#downloads 可以下载,在win7 cmd下用python ez_setup.py安装也可以装个IPyth
2023-01-31

python功能笔记——杂七杂八

×××复习阶段,无聊弄点东西玩一下,实现功能有(控制浏览器访问学校校历,截图保存下来,通过图片处理,最终将其设置为桌面):    1.控制浏览器访问网页;    2.将网页截图;    3.图片处理(图片合并、图片换色);    4.调用w
2023-01-31

EIGRP笔记(3)

关于Graceful shutdown   优雅重启动一个路由器要down时发送goodbye1、goodbye消息以hello分组方式发送2、goodbye消息的K值都是2553、no router eigrp as-number、no
2023-01-31

CCSP笔记3

IPSec ×××原理使用×××带来的×××l 数据安全 data securityl 带宽保证 lack of edicated bandwith between sites×××技术分类二层××× (Layer 2 ×××):增加一个二
2023-01-31

samba 笔记@3

samba samba 服务器软件包samba-client 客户端软件包samba-common 通用工具和库 安装:yum –y install sambarpm –qa |grep samba   # -q query –a all
2023-01-31

【JDBC】笔记(3)-

1.Statement 编译一次,只执行一次,PreparedStatement 编译一次,可执行n次,所以 PreparedStatement 效率较高...... 一.实现功能:    1.解决“应用Statement的登录系统”存在的SQL注入问题
【JDBC】笔记(3)-
2015-01-20

PS笔记3

PS基础概念:PS: 是一款针对位图图像进行处理的软件。 位图: 由像素构成的图像 (优点:画面细腻,色彩丰富,缺点:放大失真)矢量图:由运算方式(数学函数方式)得到的图像(特点:放大不失真)        (AI,CDR,由贝塞尔曲线构成
2023-01-31

【MySQL】笔记(3)-

1.4、怎么避免笛卡尔积现象?当然是加条件进行过滤;思考:避免了笛卡尔积现象,会减少记录的匹配次数吗?不会,次数还是56次。只不过显示的是有效记录...... 一.连接查询:1.1、什么是连接查询?    在实际开发中,大部分的情况下都不是从单表中查询数
【MySQL】笔记(3)-
2015-03-27

学习笔记3

一文件查找和压缩1文件查找locate 搜索依赖于数据库,非实时搜索,搜索新建文件需手动更新,适于搜索稳定不频繁修改文件 find 实时搜索,精确搜索,默认当前目录递归搜索 find用法 -maxdepth l
2023-01-31

我的笔记(3)

23.OSPF中汇总的方法:外部路由汇只可以在ASBR上进行的,内部路由汇只能在ABR上进行的。 24:OSPF中的LSA的公共头部   附:路由器的Router LSA中有一个1字节VBE字段,他定
2023-01-31

学习笔记(3)

1.* 匹配零个或多个字符(通配符中)2.ls 的-d选项不仅仅可以显示指定目录的信息,还可以用来表示不递归子文件夹。  # ls -dl /etc 显示/etc目录的信息  # ls -d /etc/* 显示/etc下面的文件和文件夹,并
2023-01-31

Linux如何复制bind文件里面的记录

这篇文章主要介绍了Linux如何复制bind文件里面的记录,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。方法如下1、实现安装bind的命令如下2、实现配置文件/etc/nam
2023-06-13

OSPF 学习笔记3

ospf特殊区域减少LSA洪泛,达到优化路由表的目的sub区域特点1、过滤了LSA4/52、通过ABR的LSA3学习到一条到达域外的缺省路由(O*IA)3、区域内所有的路由器都得设置为stub路由器4、stub区域内不能有ASBR5、stu
2023-01-31

CCNP学习笔记(3)

一、RIPv2:Routing Information Protocol 路由信息协议 1.特性: ①属于“距离矢量”路由协议 ②定期发送路由更新(30S一次,路由表中所有路由) ③依据“跳数”衡量路径好坏  //跳数(hop):route
2023-01-31

直播疑难杂症排查(3)— 首开慢

本文是 《直播疑难杂症排查》系列的第三篇文章,我们来看看直播过程中,最重要的一个性能指标:首开。1. 首开慢的表现点击播放后,需要好几秒才能显示播放画面。2. 常见首开慢问题排查2.1 点击播放后才从服务器取播放地址播放视频,第一件事就是要
2023-01-31

python学习笔记(3)

在大概了解了程序之后,我也买了本python书学习一下,因为现在新版的python3.4.0已经不再兼容2.x.x的内容,书虽然很新,但是有些例子还是用的过去的。1.比如在3.0中print 42不能再产生输出了,要改成print(42)>
2023-01-31

PowerShell 学习笔记(3)

获取对象的过程中,最好先筛选出对象,再进行操作。(即筛选在排序左边)不区分大小写get-process | where {$_.handles –ge 1000}使用where获取所有对象,用对象执行大括号里的代码,如果结果为rue,则返回
2023-01-31

编程热搜

  • Python 学习之路 - Python
    一、安装Python34Windows在Python官网(https://www.python.org/downloads/)下载安装包并安装。Python的默认安装路径是:C:\Python34配置环境变量:【右键计算机】--》【属性】-
    Python 学习之路 - Python
  • chatgpt的中文全称是什么
    chatgpt的中文全称是生成型预训练变换模型。ChatGPT是什么ChatGPT是美国人工智能研究实验室OpenAI开发的一种全新聊天机器人模型,它能够通过学习和理解人类的语言来进行对话,还能根据聊天的上下文进行互动,并协助人类完成一系列
    chatgpt的中文全称是什么
  • C/C++中extern函数使用详解
  • C/C++可变参数的使用
    可变参数的使用方法远远不止以下几种,不过在C,C++中使用可变参数时要小心,在使用printf()等函数时传入的参数个数一定不能比前面的格式化字符串中的’%’符号个数少,否则会产生访问越界,运气不好的话还会导致程序崩溃
    C/C++可变参数的使用
  • css样式文件该放在哪里
  • php中数组下标必须是连续的吗
  • Python 3 教程
    Python 3 教程 Python 的 3.0 版本,常被称为 Python 3000,或简称 Py3k。相对于 Python 的早期版本,这是一个较大的升级。为了不带入过多的累赘,Python 3.0 在设计的时候没有考虑向下兼容。 Python
    Python 3 教程
  • Python pip包管理
    一、前言    在Python中, 安装第三方模块是通过 setuptools 这个工具完成的。 Python有两个封装了 setuptools的包管理工具: easy_install  和  pip , 目前官方推荐使用 pip。    
    Python pip包管理
  • ubuntu如何重新编译内核
  • 改善Java代码之慎用java动态编译

目录