AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题

问题[nsupdate](server)

Martin Hope
nh2
Asked: 2021-06-07 15:04:24 +0800 CST

为什么 nsupdate 失败并显示“操作已取消”?

  • 1

我正在尝试使用nsupdate, running动态更新 DNS 服务器nsupdate -k mykey.private -d -v ./my-nsupdate-commands.txt。

但我得到了错误:

Communication with 192.0.2.0#53 failed: operation canceled

在哪些情况下会nsupdate导致operation canceled?


完整输出:

Creating key...
Sending update to 192.0.2.0#53
Outgoing update query:
;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id:  47216
;; flags:; ZONE: 1, PREREQ: 0, UPDATE: 2, ADDITIONAL: 1
;; ZONE SECTION:
;example.com.        IN  SOA

;; UPDATE SECTION:
mydomain.example.com.    0 ANY A 
mydomain.example.com.    61  IN  A 212.51.139.142

;; TSIG PSEUDOSECTION:
mydomain.example.com.    0 ANY TSIG  hmac-sha512. 1623020003 300 64 ... ... 47216 NOERROR 0 

; Communication with 192.0.2.0#53 failed: operation canceled
bind dynamic-dns nsupdate
  • 1 个回答
  • 265 Views
Martin Hope
Henri Gehrt
Asked: 2021-05-26 01:35:44 +0800 CST

Bind9 拒绝来自 nsupdate 的密钥

  • 0

我有一个 Bind9 DNS 服务器正在运行(并且正在运行!)。所有区域都是手动管理的。我现在想更改要自动更新的区域。设置好之后,我尝试了 nsupdate,但它因“拒绝”而失败。我不知道为什么会这样。

配置:rndc.key 包含在 named.conf 中

// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local

include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";
include "/etc/bind/rndc.key";

我还在我的 named.conf.local 中添加了允许更新语句,并确保区域文件在/var/lib/bind

root@ns1:/etc/bind# cat named.conf.local
zone "somedomain.com" {
        type master;
        file "/var/lib/bind/db.somedomain.com";
        #update-policy {grant "rndc.key" zonesub ANY;} ;
        allow-update { key rndc.key;};
        allow-transfer { some IP; };
};

密钥存在:

root@ns1:/etc/bind# cat rndc.key
key "rndc-key" {
        algorithm hmac-md5;
        secret "<secret>";
};

但是当我尝试从 localhost 更新 vie nsupdate 时,它​​会拒绝它。

root@ns1:/etc/bind# nsupdate
> server localhost
> key rndc-key <secret>
> zone somedomain.com
> update add test.somedomain.com. 600 IN A someIP
> send
update failed: REFUSED

syslog 对我也没有多大帮助

May 24 22:37:20 ns1 named[30755]: client @0x7f1f8c0e3840 127.0.0.1#27482/key rndc-key: signer "rndc-key" denied
May 24 22:37:20 ns1 named[30755]: client @0x7f1f8c0e3840 127.0.0.1#27482/key rndc-key: update 'somedomain.com/IN' denied
May 24 22:38:09 ns1 named[30755]: resolver priming query complete
May 24 22:38:38 ns1 named[30755]: resolver priming query complete

我复制并粘贴了密钥,所以应该没有错字。这些都是原始终端输出,只是更改了域和 IP。

domain-name-system bind ddns dynamic-dns nsupdate
  • 1 个回答
  • 943 Views
Martin Hope
Vladimir M.
Asked: 2016-08-19 04:59:01 +0800 CST

使用 nsupdate 按主机名删除 PTR 记录

  • 2

nsupdate允许像这样删除 PTR 记录:

delete 1.0.168.192.in-addr.arpa PTR

如何按主机名删除 PTR 记录,例如

delete host.domain.com PTR

我已经阅读了手册页,但没有帮助。一个例子将不胜感激。

linux domain-name-system nsupdate
  • 2 个回答
  • 7392 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve