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
    • 最新
    • 标签
主页 / user-594241

DigitalKiwi's questions

Martin Hope
DigitalKiwi
Asked: 2020-10-04 22:19:17 +0800 CST

Bind9新手无法解析本地地址

  • 1

我对 DNS 服务器完全陌生,作为一个教育工具,我在运行 Dietpi 的 RPi 上安装了 bind9 - 一个精简版的 Debian。

外部地址可以完美解析,但内部地址不能。我有一个这样设置的 db.local.lan 文件:

$TTL 3D 
$ORIGIN local.lan. 
local.lan. IN SOA dietpi.local.lan. hostmaster.local.lan. ( 
        2020100418 ; serial 
        8H ; refresh 
        4H ; retry 
        4W ; expire 
        1D ; minimum 
    ) 
    local.lan. IN NS dietpi.local.lan. 
    local.lan. IN MX 10 dietpi.local.lan. 
    localhost IN A 127.0.0.1 
    dietpi IN A 192.168.20.254 
    router IN A 192.168.20.1 
    NL1901ACV IN A 192.168.20.1

named.conf.local 是这样的:

//
// Do any local configuration here
//

zone "local.lan" IN {
            type master;
            file "/etc/bind/db.local.lan";
      };
    zone "20.168.192.in-addr.arpa" {
            type master;
            file "/etc/bind/db.rev.20.168.192.in-addr.arpa";
      };

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

我有一台电脑设置为使用这个设备作为它的 dns 服务器。从这台电脑我可以ping google.com,但如果我尝试pingdietpi 或dietpi.local.lan,我会收到找不到主机的错误。

named-checkconf 没有显示任何错误。

named-checkconf -z 返回以下内容 - 我不知道这意味着什么!

/etc/bind/db.local.lan:10: unknown RR type 'local.lan.'
/etc/bind/db.local.lan:11: unknown RR type 'local.lan.'
/etc/bind/db.local.lan:12: unknown RR type 'localhost'
/etc/bind/db.local.lan:13: unknown RR type 'dietpi'
/etc/bind/db.local.lan:14: unknown RR type 'router'
/etc/bind/db.local.lan:15: unknown RR type 'NL1901ACV'
zone local.lan/IN: loading from master file /etc/bind/db.local.lan failed: unknown class/type
zone local.lan/IN: not loaded due to errors.
_default/local.lan/IN: unknown class/type
/etc/bind/db.rev.20.168.192.in-addr.arpa:1: no TTL specified; using SOA MINTTL instead
/etc/bind/db.rev.20.168.192.in-addr.arpa:10: TTL set to prior TTL (1)
zone 20.168.192.in-addr.arpa/IN: loaded serial 2020100417
zone localhost/IN: loaded serial 2
zone 127.in-addr.arpa/IN: loaded serial 1
zone 0.in-addr.arpa/IN: loaded serial 1
zone 255.in-addr.arpa/IN: loaded serial 1

谁能解释我做错了什么?

提前致谢。大卫。

domain-name-system bind
  • 1 个回答
  • 833 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