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 / 问题 / 617313
Accepted
Kladskull
Kladskull
Asked: 2014-08-02 12:40:18 +0800 CST2014-08-02 12:40:18 +0800 CST 2014-08-02 12:40:18 +0800 CST

为什么 nslookup 不返回我对绑定服务器的期望?(已配置 RPZ)

  • 772

在这个问题之前,我一直在寻求一些帮助,以找到一种方法来根据他们的 IP 地址向查询客户端返回不同的响应。问题在这里得到了解答:如何选择性地覆盖绑定 DNS 服务器上的一些 A 记录?

我遵循了公认的答案,现在遇到了问题。

当我运行时:

nslookup faq.test.com 

我期望这个:

root@dev:/etc/bind# nslookup vaultofsatoshi.com
Server:     172.16.225.132
Address:    172.16.225.132#53

Non-authoritative answer:
Name:   faq.test.com
Address: 192.168.1.1

但是,我得到了这个:

root@dev:/etc/bind# nslookup faq.test.com
Server:     172.16.225.132
Address:    172.16.225.132#53

** server can't find faq.test.com: NXDOMAIN

我应该提到,查询 google.com 或任何其他网站都可以正常工作并返回一切正常,只是我覆盖它失败的那些。我在下面包含了我的配置文件,任何帮助将不胜感激。

/etc/bind/named.conf

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

/etc/bind/named.conf.options

options {
    directory "/var/cache/bind";

    forwarders {
        8.8.8.8;
        8.8.4.4;
    };

    response-policy { 
        zone "development-overrides"; 
    };

    auth-nxdomain no;    # conform to RFC1035
    listen-on-v6 { any; };
    allow-query { trusted; };
    allow-recursion { trusted; };
    recursion yes;
    dnssec-enable no;
    dnssec-validation no;
};

/etc/bind/named.conf.local

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

acl "trusted" {
    172.16.225.132;
    127.0.0.1;
};

include "/etc/bind/zones.override";

logging {
    channel bind_log {
        file "/var/log/named/named.log" versions 5 size 30m;
        severity info;
        print-time yes;
        print-severity yes;
        print-category yes;
    };
    category default { bind_log; };
    category queries { bind_log; };
};

/etc/bind/named.conf.default-zones

// prime the server with knowledge of the root servers
zone "." {
    type hint;
    file "/etc/bind/db.root";
};

// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912

zone "localhost" {
    type master;
    file "/etc/bind/db.local";
};

zone "127.in-addr.arpa" {
    type master;
    file "/etc/bind/db.127";
};

zone "0.in-addr.arpa" {
    type master;
    file "/etc/bind/db.0";
};

zone "255.in-addr.arpa" {
    type master;
    file "/etc/bind/db.255";
};

/etc/bind/development-overrides

$TTL 1H
@                       SOA LOCALHOST. test.com (1 1h 15m 30d 2h)
                        NS  LOCALHOST.

support.test.com     A   192.168.1.1
faq.test.com         A   192.168.1.1

; do not rewrite (PASSTHRU) OK.DOMAIN.COM
*               A   rpz-passthru.
linux
  • 1 1 个回答
  • 1738 Views

1 个回答

  • Voted
  1. Best Answer
    Håkan Lindqvist
    2014-08-02T14:05:50+08:002014-08-02T14:05:50+08:00

    RPZ 区域中的最后一行在语法上看起来无效。

    RPZ 区域的语法与常规区域的语法相同,只是对 RPZ 有特殊的语义。

    考虑到这一点,很明显,A记录不可能具有rpz-passthru.它的价值。一条A记录只能有一个 IPv4 地址作为它的值。

    如果您查看RPZ 文档,您会发现特殊的 RPZ 指令(如rpz-passthru.)使用CNAME记录类型。

    named-checkconf -zj和/或阅读日志通常会有所帮助。我假设,当使用问题中的区域数据时,RPZ 区域将无法加载,并且应该有错误(我预计会出现关于“坏虚线四边形”或类似内容的错误)。

    作为单独的说明,我不认为最后一行是真正需要的,它似乎只是(尝试)明确定义默认行为。

    • 1

相关问题

  • Linux 主机到主机迁移

  • 如何在 Linux 机器上找到有关硬件的详细信息?

  • 如何在 Linux 下监控每个进程的网络 I/O 使用情况?

  • 在 RHEL4 上修改 CUPS 中的现有打印机设置

  • 为本地网络中的名称解析添加自定义 dns 条目

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