- 论坛徽章:
- 0
|
rndc.conf 里的字符串 KEY 与 rndc.key 内的一致。 也与远程服务器上的named.conf 里的一致。
防火墙已经开放了 953:TCP
环境两台PC服务器,内网IP分别是 192.168.1.170 , 192.168.1.169
170 和 169 都装有bind . 希望使用170上的 rndc 管理 169上的BIND。
170管理自己本机的没问题。
下面是 170 的 rndc.conf 和 169的 named.conf- # 192.168.1.170 /etc/rndc.conf
- key "rndckey" {
- algorithm hmac-md5;
- secret "hicYxUdVMusnLMXOtxaOFAJ3lti7AP5owkraSo1R6fegMNF0JDdfx6KK3NzG";
- };
- key "192-168-1-170" {
- algorithm hmac-md5;
- secret "RFofx10uP15XfechRjB5ASuEwPH0cyX9lbv9VXDeNYM1RDolOeusDTsmdLG1";
- };
- server 192.168.1.169 {
- key "192-168-1-170";
- };
- options {
- default-key "rndckey";
- default-server 127.0.0.1;
- default-port 953;
- };
复制代码- # 192.168.1.169 /var/named/chroot/etc/named.conf
- options {
- directory "/var/named";
- pid-file "/var/run/named.pid";
- dump-file "/var/named/data/cache_dump.db";
- statistics-file "/var/named/data/named_stats.txt";
- recursion no;
- // query-source address * port 53;
- allow-query {any;};
- };
- controls {
- inet 127.0.0.1 port 953
- allow {127.0.0.1;} keys {"rndckey";};
- inet 192.168.1.169 port 953
- allow { 192.168.1.170; } keys { "192-168-1-170"; };
- };
- zone "." IN {
- type hint;
- file "named.ca";
- };
- zone "localdomain" IN {
- type master;
- file "localdomain.zone";
- allow-update { none; };
- };
- zone "localhost" IN {
- type master;
- file "localhost.zone";
- allow-update { 127.0.0.1 ; };
- };
- zone "0.0.127.in-addr.arpa" IN {
- type master;
- file "named.local";
- allow-update { none; };
- };
- zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
- type master;
- file "named.ip6.local";
- allow-update { none; };
- };
- zone "255.in-addr.arpa" IN {
- type master;
- file "named.broadcast";
- allow-update { none; };
- };
- zone "0.in-addr.arpa" IN {
- type master;
- file "named.zero";
- allow-update { none; };
- };
- key "rndckey" {
- algorithm hmac-md5;
- secret "RFofx10uP15XfechRjB5ASuEwPH0cyX9lbv9VXDeNYM1RDolOeusDTsmdLG1";
- };
- key "192-168-1-170" {
- algorithm hmac-md5;
- secret "RFofx10uP15XfechRjB5ASuEwPH0cyX9lbv9VXDeNYM1RDolOeusDTsmdLG1";
- };
复制代码 连接无法通信。
[root@test003 etc]# rndc -s 192.168.1.169 -V status
create memory context
create socket manager
create task manager
create task
create logging context
setting log tag
creating log channel
enabling log channel
create parser
get key for server
get config key list
decode base64 secret
status
post event
using server 192.168.1.169 (192.168.1.169#953)
create socket
connect
create message
render message
schedule recv
send message
rndc: connection to remote host closed
This may indicate that the remote server is using an older version of
the command protocol, this host is not authorized to connect,
or the key is invalid.
希望高能能指点一下。感谢。
|
|