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-636801

user3486308's questions

Martin Hope
user3486308
Asked: 2020-06-23 11:06:46 +0800 CST

如何在 DNS 转发文件中添加两个名称服务器?

  • 7

这是我的 DNS 转发文件,当我想将它作为服务运行时它给了我错误。我认为这是一个语法错误,但不知道如何纠正它?

$TTL 86400
@   IN  SOA     ns1.sudia.com. root.sudia.com. (
                                              3           ;Serial
                                              3600        ;Refresh
                                              1800        ;Retry
                                              604800      ;Expire
                                              86400       ;Minimum TTL
)
@   IN  SOA     ns2.sudia.com. root.sudia.com. (
                                              3           ;Serial
                                              3600        ;Refresh
                                              1800        ;Retry
                                              604800      ;Expire
                                              86400       ;Minimum TTL
)



;Name Server Information
@       IN  NS      ns1.sudia.com.
@       IN  NS      ns2.sudia.com.

;IP address of Name Server
ns1       IN  A       136.243.197.164
ns2       IN  A       136.243.197.164

;A - Record HostName To Ip Address
sudia.com.     IN  A       136.243.197.164
www             IN  A       136.243.197.164

;CNAME record
ftp     IN CNAME        www.sudia.com.

这是错误:

(base) [root@wdrserver named]# systemctl status named.service
● named.service - Berkeley Internet Name Domain (DNS)
   Loaded: loaded (/usr/lib/systemd/system/named.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2020-06-22 23:39:21 +0430; 13s ago
  Process: 3135 ExecStop=/bin/sh -c /usr/sbin/rndc stop > /dev/null 2>&1 || /bin/kill -TERM $MAINPID (code=exited, status=0/SUCCESS)
  Process: 3110 ExecStart=/usr/sbin/named -u named -c ${NAMEDCONF} $OPTIONS (code=exited, status=0/SUCCESS)
  Process: 3233 ExecStartPre=/bin/bash -c if [ ! "$DISABLE_ZONE_CHECKING" == "yes" ]; then /usr/sbin/named-checkconf -z "$NAMEDCONF"; else echo "Checking of zone files is disabled"; fi (co>
 Main PID: 3111 (code=exited, status=0/SUCCESS)

Jun 22 23:39:21 wdrserver bash[3233]: zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
Jun 22 23:39:21 wdrserver bash[3233]: zone 0.in-addr.arpa/IN: loaded serial 0
Jun 22 23:39:21 wdrserver bash[3233]: dns_master_load: fwd.sudia.com.db:28: sudia.com: multiple RRs of singleton type
Jun 22 23:39:21 wdrserver bash[3233]: zone sudia.com/IN: loading from master file fwd.sudia.com.db failed: multiple RRs of singleton type
Jun 22 23:39:21 wdrserver bash[3233]: zone sudia.com/IN: not loaded due to errors.
Jun 22 23:39:21 wdrserver bash[3233]: _default/sudia.com/IN: multiple RRs of singleton type
Jun 22 23:39:21 wdrserver bash[3233]: zone 197.243.136.in-addr.arpa/IN: loaded serial 3
Jun 22 23:39:21 wdrserver systemd[1]: named.service: Control process exited, code=exited status=1
Jun 22 23:39:21 wdrserver systemd[1]: named.service: Failed with result 'exit-code'.
Jun 22 23:39:21 wdrserver systemd[1]: Failed to start Berkeley Internet Name Domain (DNS).
dns syntax
  • 1 个回答
  • 210 Views
Martin Hope
user3486308
Asked: 2020-06-23 04:19:52 +0800 CST

为什么使用我的域地址无法访问我的网站?

  • 5

我使用以下文件创建了一个 DNS 服务器,将我的域地址映射sudia.com到我的 VPS 服务器,但它不起作用,我无法使用我的域地址访问我的服务器。还必须说有一个 NginX 正在运行http://136.243.197.164:3200。

/etc/named.conf:

        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        secroots-file   "/var/named/data/named.secroots";
        recursing-file  "/var/named/data/named.recursing";
        allow-query     { localhost; 136.243.197.164;};

        /*
         - If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.
         - If you are building a RECURSIVE (caching) DNS server, you need to enable
           recursion.
         - If your recursive DNS server has a public IP address, you MUST enable access
           control to limit queries to your legitimate users. Failing to do so will
           cause your server to become part of large scale DNS amplification
           attacks. Implementing BCP38 within your network would greatly
           reduce such attack surface
        */
        recursion yes;

        dnssec-enable yes;
        dnssec-validation yes;

        managed-keys-directory "/var/named/dynamic";

        pid-file "/run/named/named.pid";
        session-keyfile "/run/named/session.key";

        /* https://fedoraproject.org/wiki/Changes/CryptoPolicy */
        include "/etc/crypto-policies/back-ends/bind.config";
};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

zone "." IN {
        type hint;
        file "named.ca";
};

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

//forward zone
zone "sudia.com" IN {
        type master;
        file "fwd.sudia.com.db";
        allow-update { none; };
        allow-query  { any; };
};

//backward zone
zone "197.243.136.in-addr.arpa" IN {
        type master;
        file "sudia.com.rev";
        allow-update { none; };
        allow-query  { any; };
};

/var/named/fwd.sudia.com.db:

$TTL 86400
@   IN  SOA     ns1.sudia.com. ns2.sudia.com. (
                                              3           ;Serial
                                              3600        ;Refresh
                                              1800        ;Retry
                                              604800      ;Expire
                                              86400       ;Minimum TTL
)

;Name Server Information
@       IN  NS      ns1.sudia.com.

;IP address of Name Server
ns1       IN  A       136.243.197.164

;A - Record HostName To Ip Address
www     IN  A       136.243.197.164

;CNAME record
ftp     IN CNAME        www.sudsuz.com.

/var/named/sudia.com.rev:

$TTL 86400
@   IN  SOA     ns1.sudia.com. ns2.sudia.com. (
                                       3           ;Serial
                                       3600        ;Refresh
                                       1800        ;Retry
                                       604800      ;Expire
                                       86400       ;Minimum TTL
)

;Name Server Information
@         IN      NS         ns1.sudia.com.

;Reverse lookup for Name Server
164        IN  PTR     ns1.sudia.com.

;PTR Record IP address to HostName
164      IN  PTR     www.sudia.com

编辑:这是结果host www.sudia.com:

www.sudia.com has address 136.243.197.164

但是host sudia.com(没有www)不起作用!

nginx dns
  • 1 个回答
  • 119 Views

Sidebar

Stats

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

    如何减少“vmmem”进程的消耗?

    • 11 个回答
  • Marko Smith

    从 Microsoft Stream 下载视频

    • 4 个回答
  • Marko Smith

    Google Chrome DevTools 无法解析 SourceMap:chrome-extension

    • 6 个回答
  • Marko Smith

    Windows 照片查看器因为内存不足而无法运行?

    • 5 个回答
  • Marko Smith

    支持结束后如何激活 WindowsXP?

    • 6 个回答
  • Marko Smith

    远程桌面间歇性冻结

    • 7 个回答
  • Marko Smith

    子网掩码 /32 是什么意思?

    • 6 个回答
  • Marko Smith

    鼠标指针在 Windows 中按下的箭头键上移动?

    • 1 个回答
  • Marko Smith

    VirtualBox 无法以 VERR_NEM_VM_CREATE_FAILED 启动

    • 8 个回答
  • Marko Smith

    应用程序不会出现在 MacBook 的摄像头和麦克风隐私设置中

    • 5 个回答
  • Martin Hope
    Vickel Firefox 不再允许粘贴到 WhatsApp 网页中? 2023-08-18 05:04:35 +0800 CST
  • Martin Hope
    Saaru Lindestøkke 为什么使用 Python 的 tar 库时 tar.xz 文件比 macOS tar 小 15 倍? 2021-03-14 09:37:48 +0800 CST
  • Martin Hope
    CiaranWelsh 如何减少“vmmem”进程的消耗? 2020-06-10 02:06:58 +0800 CST
  • Martin Hope
    Jim Windows 10 搜索未加载,显示空白窗口 2020-02-06 03:28:26 +0800 CST
  • Martin Hope
    andre_ss6 远程桌面间歇性冻结 2019-09-11 12:56:40 +0800 CST
  • Martin Hope
    Riley Carney 为什么在 URL 后面加一个点会删除登录信息? 2019-08-06 10:59:24 +0800 CST
  • Martin Hope
    zdimension 鼠标指针在 Windows 中按下的箭头键上移动? 2019-08-04 06:39:57 +0800 CST
  • Martin Hope
    jonsca 我所有的 Firefox 附加组件突然被禁用了,我该如何重新启用它们? 2019-05-04 17:58:52 +0800 CST
  • Martin Hope
    MCK 是否可以使用文本创建二维码? 2019-04-02 06:32:14 +0800 CST
  • Martin Hope
    SoniEx2 更改 git init 默认分支名称 2019-04-01 06:16:56 +0800 CST

热门标签

windows-10 linux windows microsoft-excel networking ubuntu worksheet-function bash command-line hard-drive

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve