首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >BIND9,nsupdate和该死的DDNS

BIND9,nsupdate和该死的DDNS
EN

Stack Overflow用户
提问于 2013-08-14 16:06:02
回答 1查看 4.2K关注 0票数 2

我已经在DDNS上翻阅了这么多的操作页面试图修复这个问题.我不知所措。

WorkstationX = CentOS 6.2 x64 ServerX =Ubuntu12.04 LTS x64

我不明白为什么不管用..。我真的没什么主意了。我已经再生和重新配置了所有东西好几次。

我已经确定:

  • 在两台主机上运行NTPD,我已经证实NTP正常工作。
  • TZ对两个节点都是正确的(硬件是UTC)。
  • 我遵循了以下指南:
    • http://linux.yyz.us/nsupdate/
    • http://agiletesting.blogspot.com.au/2012/03/dynamic-dns-updates-with-nsupdate-and.html
    • http://www.cheshirekow.com/wordpress/?p=457
    • https://www.erianna.com/nsupdate-dynamic-dns-updates-with-bind9
    • nsupdate
    • http://blog.philippklaus.de/2013/01/updating-dns-entries-with-nsupdate-or-alternative-implementations-your-own-ddns/

他们中的一些人有不同的产生密钥的方法,但其他的是一样的.但是,即使在运行dnssec-keygen的服务器上(以及bind在哪里),我也会得到相同的日志条目:

代码语言:javascript
复制
Aug 14 11:20:38 vps named[31247]: 14-Aug-2013 11:20:38.032 security: error: client 127.0.0.1#29403: view public: request has invalid signature: TSIG domain2.com.au.: tsig verify failure (BADKEY)

从这个未知数:

代码语言:javascript
复制
nsupdate -k Kdomain2.com.au.+157+35454.key
server localhost
zone domain2.com.au.
update add test.domain2.com.au. 86400 IN A 10.20.30.40
show
send

我收集的是正确的生成方法:

代码语言:javascript
复制
dnssec-keygen -a HMAC-MD5 -b 512 -n HOST domain2.com.au.

named.conf (为保护隐私而更改的IP):

代码语言:javascript
复制
acl ipv4                { 0.0.0.0/0; };
acl ipv6                { 2000::/3; ::1; fe80::/10; fec0::/10; };
acl safehosts           { 127.0.0.0/8; 3.2.2.40; 44.44.14.12; };

include "/etc/bind/rndc.key";

controls {
        inet * port 953
        allow { safehosts; } keys { "rndc-key"; };
};

options
{
        auth-nxdomain           yes;
        empty-zones-enable      no;
        zone-statistics         yes;
        dnssec-enable           yes;
        listen-on               { any; };
        listen-on-v6            { any; };
        directory               "/etc/bind/db";
        managed-keys-directory  "/etc/bind/keys";
        memstatistics-file      "/etc/bind/data/bind.memstats";
        statistics-file         "/etc/bind/data/bind.qstats";
};

logging
{
## CUT ##
};

view "public"
{
    recursion           yes;
    allow-query-cache   { safehosts; };
    allow-recursion     { safehosts; };

zone "." IN {
    type            hint;
    file            "root.zone";
};

zone "0.0.127.in-addr.arpa" {
    type            master;
    allow-update    { none; };
    allow-transfer  { none; };
    file            "0.0.127.in-addr.arpa.zone";
};

zone "localhost" {
    type            master;
    allow-update    { none; };
    allow-transfer  { none; };
    file            "localhost.zone";
};

zone "3.2.2.in-addr.arpa" {
    type            master;
    allow-update    { none; };
    allow-transfer  { none; };
    file            "3.2.2.in-addr.arpa.zone";
};

zone "domain1.com.au" {
    type            master;
    notify          yes;
    allow-update    { key "rndc-key"; };
    allow-transfer  { key "rndc-key"; };
    file            "domain1.com.au.zone";
};

zone "domain2.com.au" {
    type            master;
    notify          yes;
    allow-update    { key "rndc-key"; };
    allow-transfer  { key "rndc-key"; };
    file            "doomain2.com.au.zone";
};
};

/etc/bind/rndc.key:

代码语言:javascript
复制
key "rndc-key" {
    algorithm hmac-md5;
    secret "vZwCYBx4OAOsBrbdlooUfBaQx+kwEi2eLDXdr+JMs4ykrwXKQTtDSg/jp7eHnw39IehVLMtuVECTqfOwhXBm0A==";
};

Kdomain1.com.au.+157+35454.private

代码语言:javascript
复制
Private-key-format: v1.3
Algorithm: 157 (HMAC_MD5)
Key: vZwCYBx4OAOsBrbdlooUfBaQx+kwEi2eLDXdr+JMs4ykrwXKQTtDSg/jp7eHnw39IehVLMtuVECTqfOwhXBm0A==
Bits: AAA=
Created: 20130814144733
Publish: 20130814144733
Activate: 20130814144733
EN

回答 1

Stack Overflow用户

发布于 2014-05-26 17:24:05

解决办法:

我不知道为什么,但现在起作用了。我只做了以下几件事:

代码语言:javascript
复制
# chown -R named:named /var/named 

# find . -type d -exec chmod 770 {} \; 

# find . -type f -exec chmod 660 {} \;  
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18236807

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档