Linux如可开启named服务,linux named服务配置问题请教

想在linux 下实现dns动态解释

照着网上设置

在service named restart 出现问题如下:

[root@localhost etc]# service named restart

停止 named:

启动 named:/etc/named.conf:39: unknown option ' algorithm'

/etc/named.conf:41: unknown option ' secret'

Jun 25 09:04:13.810 starting BIND 9.2.4 -g

Jun 25 09:04:13.812 using 1 CPU

Jun 25 09:04:13.835 loading configuration from '/etc/named.conf'

Jun 25 09:04:13.835 none:0: open: /etc/named.conf: permission denied

Jun 25 09:04:13.836 loading configuration: permission denied

Jun 25 09:04:13.836 exiting (due to fatal error)

Error in configuration file /etc/named.conf : [失败]

[root@localhost etc]#

配置/etc/named.conf 如下:

[root@localhost etc]# vi named.conf

//

// named.conf for Red Hat caching-nameserver

//

options {

directory "/var/named";

dump-file "/var/named/data/cache_dump.db";

statistics-file "/var/named/data/named_stats.txt";

/*

* If there is a firewall between you and nameservers you want

* to talk to, you might need to uncomment the query-source

* directive below.  Previous versions of BIND always asked

* questions using port 53, but BIND 8.1 uses an unprivileged

* port by default.

*/

// query-source address * port 53;

};

//

// a caching only nameserver config

//

"named.conf" 75L, 1562C                                                  1,1          顶端

//

// named.conf for Red Hat caching-nameserver

//

options {

directory "/var/named";

dump-file "/var/named/data/cache_dump.db";

statistics-file "/var/named/data/named_stats.txt";

/*

* If there is a firewall between you and nameservers you want

* to talk to, you might need to uncomment the query-source

* directive below.  Previous versions of BIND always asked

* questions using port 53, but BIND 8.1 uses an unprivileged

* port by default.

*/

// query-source address * port 53;

};

//

// a caching only nameserver config

//

controls {

inet 127.0.0.1 allow { localhost; } keys { rndckey; };

};

zone "." IN {

type hint;

file "named.ca";

};

zone "localdomain" IN {

type master;

file "localdomain.zone";

allow-update { none; };

};

/* 算法函数*/

key myddns {

/* 指明生成密钥的算法 */

algorithm HMAC-MD5.SIG-ALG.REG.INT;

/* 指明密钥*/

secret VbJf6KC3Q4eU2KeFGopFhQ==;};

[root@localhost etc]# cat named.conf

//

// named.conf for Red Hat caching-nameserver

//

options {

directory "/var/named";

dump-file "/var/named/data/cache_dump.db";

statistics-file "/var/named/data/named_stats.txt";

/*

* If there is a firewall between you and nameservers you want

* to talk to, you might need to uncomment the query-source

* directive below.  Previous versions of BIND always asked

* questions using port 53, but BIND 8.1 uses an unprivileged

* port by default.

*/

// query-source address * port 53;

};

//

// a caching only nameserver config

//

controls {

inet 127.0.0.1 allow { localhost; } keys { rndckey; };

};

zone "." IN {

type hint;

file "named.ca";

};

zone "localdomain" IN {

type master;

file "localdomain.zone";

allow-update { none; };

};

/* 算法函数*/

key myddns {

/* 指明生成密钥的算法 */

algorithm HMAC-MD5.SIG-ALG.REG.INT;

/* 指明密钥*/

secret VbJf6KC3Q4eU2KeFGopFhQ==;};

# 正向解释IP->DNS

zone "trytest.com" IN {

type master;

file "trytest.com";

allow-update { Kroot.+157+14564.key; };

};

# 反向解释DNS->IP

zone "0.0.127.in-addr.arpa" IN {

type master;

file "trytest.ddns.ip";

allow-update { Kroot.+157+14564.key; };

};

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; };

};

include "/etc/rndc.key";

请问怎么将算法可以使用?

还有后面报权限的问题又是什么原因?

请高手指教!!感激不尽!!

--------------------next---------------------

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值