zoukankan      html  css  js  c++  java
  • linux搭建dns服务器

    实验内容

    IP 地址是与服务器内容没有关联的一串数字,不便于记忆,通过 DNS 可以帮助我们将这些无意义、难以记忆的数字与有意义的描述做关联,帮助我们记忆,本实验便将带领大家搭建自己的 DNS 服务器。

    实验知识点

    • DNS 简介
    • DNS 解析
    • DNS 搭建
    • DNS 验证

    推荐阅读

    DNS 是 Domain Name System(域名系统)的简称,DNS 是一个分层的分布式命名系统,用于连接到互联网或专用网络的计算机,服务或其他资源。它将各种信息与分配给每个参与实体的域名关联起来。

    简单来说其最大的功能就是将域名翻译成 IP 地址

    人的姓名是由姓氏与名字构成的,同样域名也是由多个部分构成的。构成域名的每个部分称为一个区域(zone),主要是这样分级的:主机名.二级域名.顶级域名.

    www.baiidu.com

    www 主机名,三级域名

    baidu 二级域名

    com 顶级域名

    在 Linux 中我们可以通过 /etc/nsswitch.conf 配置文件修改 DNS 查询的顺序。

    通过 sudo vim /etc/nsswitch.conf 打开该配置文件,往下查看就可以看到这样的配置:

    hosts: files mdns4_minimal [NOTFOUND=return] dns

    这里的 files 代表的就是 /etc/hosts 文件,dns 代表的是系统配置的 DNS 服务器地址。所以在 Linux 中默认是先查询 hosts 文件中的记录,然后再请求 DNS 服务器

    cat /etc/hosts

    0.0.0.0 account.jetbrains.com

    ip 域名

    DNS 服务器配置文件

    系统设定的 DNS 服务器配置文件位于 /etc/resolv.conf

    nameserver 114.114.114.114
    nameserver 8.8.8.8
    nameserver 127.0.0.53

    dns选用

    DNS 的使用方案有许多,常见的开源软件有:

    • BIND:全名为 Berkeley Internet Name Domain,是早在 1980 年左右有 Berkeley 大学公开出来的 DNS 服务实现,也是使用最为广泛的方案。后由 ISC 基于 BIND 重写发布 BIND9

    • PowerDNS:PowerDNS 由 C++ 实现于 1990 年末,起源一个商业软件于 2002 年开源,相对于 BIND 在数据库选用上与集群上功能更多更灵活

    • CoreDNS:由 SkyDNS 进化而来,主要作为一种可插拔的中间件

    • DNSpod-sr:一款由国内服务商开源的一套 DNS 的实现

    此次我们将选用最为成熟、拥有良好 License 的 BIND9 来搭建属于我们自己的 DNS 服务器。

    bind9安装

    shiyanlou:~/ $ cat /etc/apt/sources.list [16:35:31]
    # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
    # newer versions of the distribution.
    deb http://mirrors.cloud.aliyuncs.com/ubuntu/ xenial main restricted
    # deb-src http://mirrors.cloud.aliyuncs.com/ubuntu/ xenial main restricted

    ## Major bug fix updates produced after the final release of the
    ## distribution.
    deb http://mirrors.cloud.aliyuncs.com/ubuntu/ xenial-updates main restricted
    # deb-src http://mirrors.cloud.aliyuncs.com/ubuntu/ xenial-updates main restricted

    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team. Also, please note that software in universe WILL NOT receive any
    ## review or updates from the Ubuntu security team.
    deb http://mirrors.cloud.aliyuncs.com/ubuntu/ xenial universe
    # deb-src http://mirrors.cloud.aliyuncs.com/ubuntu/ xenial universe
    deb http://mirrors.cloud.aliyuncs.com/ubuntu/ xenial-updates universe
    # deb-src http://mirrors.cloud.aliyuncs.com/ubuntu/ xenial-updates universe

    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team, and may not be under a free licence. Please satisfy yourself as to
    ## your rights to use the software. Also, please note that software in
    ## multiverse WILL NOT receive any review or updates from the Ubuntu
    ## security team.
    deb http://mirrors.cloud.aliyuncs.com/ubuntu/ xenial multiverse
    # deb-src http://mirrors.cloud.aliyuncs.com/ubuntu/ xenial multiverse
    deb http://mirrors.cloud.aliyuncs.com/ubuntu/ xenial-updates multiverse
    # deb-src http://mirrors.cloud.aliyuncs.com/ubuntu/ xenial-updates multiverse

    ## N.B. software from this repository may not have been tested as
    ## extensively as that contained in the main release, although it includes
    ## newer versions of some applications which may provide useful features.
    ## Also, please note that software in backports WILL NOT receive any review
    ## or updates from the Ubuntu security team.
    deb http://mirrors.cloud.aliyuncs.com/ubuntu/ xenial-backports main restricted universe multiverse
    # deb-src http://mirrors.cloud.aliyuncs.com/ubuntu/ xenial-backports main restricted universe multiverse

    ## Uncomment the following two lines to add software from Canonical's
    ## 'partner' repository.
    ## This software is not part of Ubuntu, but is offered by Canonical and the
    ## respective vendors as a service to Ubuntu users.
    # deb http://archive.canonical.com/ubuntu xenial partner
    # deb-src http://archive.canonical.com/ubuntu xenial partner

    deb http://mirrors.cloud.aliyuncs.com/ubuntu/ xenial-security main restricted
    # deb-src http://mirrors.cloud.aliyuncs.com/ubuntu/ xenial-security main restricted
    deb http://mirrors.cloud.aliyuncs.com/ubuntu/ xenial-security universe
    # deb-src http://mirrors.cloud.aliyuncs.com/ubuntu/ xenial-security universe
    deb http://mirrors.cloud.aliyuncs.com/ubuntu/ xenial-security multiverse
    # deb-src http://mirrors.cloud.aliyuncs.com/ubuntu/ xenial-security multiverse
    shiyanlou:~/ $ cat /etc/issue [16:35:46]
    Ubuntu 16.04.7 LTS l

    shiyanlou:~/ $ sudo apt -y intall bind9 bind9utils bind9-doc [16:35:54]
    E: u4e0du80fdu7406u89e3u547du4ee4u884cu9009u9879 u201cyu201d [u6765u81ea -y] u4e0eu5176u4ed6u9009u9879u7684u642du914du3002
    shiyanlou:~/ $ sudo apt -y install bind9 bind9utils bind9-doc [16:36:34]
    u6b63u5728u8bfbu53d6u8f6fu4ef6u5305u5217u8868... u5b8cu6210
    u6b63u5728u5206u6790u8f6fu4ef6u5305u7684u4f9du8d56u5173u7cfbu6811
    u6b63u5728u8bfbu53d6u72b6u6001u4fe1u606f... u5b8cu6210
    u5c06u4f1au540cu65f6u5b89u88c5u4e0bu5217u8f6fu4ef6uff1a
    libirs141
    u5efau8baeu5b89u88c5uff1a
    resolvconf ufw
    u4e0bu5217u3010u65b0u3011u8f6fu4ef6u5305u5c06u88abu5b89u88c5uff1a
    bind9 bind9-doc bind9utils libirs141
    u5347u7ea7u4e86 0 u4e2au8f6fu4ef6u5305uff0cu65b0u5b89u88c5u4e86 4 u4e2au8f6fu4ef6u5305uff0cu8981u5378u8f7d 0 u4e2au8f6fu4ef6u5305uff0cu6709 0 u4e2au8f6fu4ef6u5305u672au88abu5347u7ea7u3002
    u9700u8981u4e0bu8f7d 790 kB u7684u5f52u6863u3002
    u89e3u538bu7f29u540eu4f1au6d88u8017 4,538 kB u7684u989du5916u7a7au95f4u3002
    u83b7u53d6:1 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/main amd64 libirs141 amd64 1:9.10.3.dfsg.P4-8ubuntu1.17 [18.0 kB]
    u83b7u53d6:2 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/main amd64 bind9utils amd64 1:9.10.3.dfsg.P4-8ubuntu1.17 [201 kB]
    u83b7u53d6:3 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/main amd64 bind9 amd64 1:9.10.3.dfsg.P4-8ubuntu1.17 [373 kB]
    u83b7u53d6:4 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/main amd64 bind9-doc all 1:9.10.3.dfsg.P4-8ubuntu1.17 [199 kB]
    u5df2u4e0bu8f7d 790 kBuff0cu8017u65f6 0u79d2 (5,267 kB/s)
    u6b63u5728u9884u8bbeu5b9au8f6fu4ef6u5305 ...
    u6b63u5728u9009u4e2du672au9009u62e9u7684u8f6fu4ef6u5305 libirs141:amd64u3002
    (u6b63u5728u8bfbu53d6u6570u636eu5e93 ... u7cfbu7edfu5f53u524du5171u5b89u88c5u6709 136529 u4e2au6587u4ef6u548cu76eeu5f55u3002)
    u6b63u51c6u5907u89e3u5305 .../libirs141_1%3a9.10.3.dfsg.P4-8ubuntu1.17_amd64.deb ...
    u6b63u5728u89e3u5305 libirs141:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.17) ...
    u6b63u5728u9009u4e2du672au9009u62e9u7684u8f6fu4ef6u5305 bind9utilsu3002
    u6b63u51c6u5907u89e3u5305 .../bind9utils_1%3a9.10.3.dfsg.P4-8ubuntu1.17_amd64.deb ...
    u6b63u5728u89e3u5305 bind9utils (1:9.10.3.dfsg.P4-8ubuntu1.17) ...
    u6b63u5728u9009u4e2du672au9009u62e9u7684u8f6fu4ef6u5305 bind9u3002
    u6b63u51c6u5907u89e3u5305 .../bind9_1%3a9.10.3.dfsg.P4-8ubuntu1.17_amd64.deb ...
    u6b63u5728u89e3u5305 bind9 (1:9.10.3.dfsg.P4-8ubuntu1.17) ...
    u6b63u5728u9009u4e2du672au9009u62e9u7684u8f6fu4ef6u5305 bind9-docu3002
    u6b63u51c6u5907u89e3u5305 .../bind9-doc_1%3a9.10.3.dfsg.P4-8ubuntu1.17_all.deb ...
    u6b63u5728u89e3u5305 bind9-doc (1:9.10.3.dfsg.P4-8ubuntu1.17) ...
    u6b63u5728u5904u7406u7528u4e8e libc-bin (2.23-0ubuntu11.2) u7684u89e6u53d1u5668 ...
    u6b63u5728u5904u7406u7528u4e8e man-db (2.7.5-1) u7684u89e6u53d1u5668 ...
    u6b63u5728u5904u7406u7528u4e8e systemd (229-4ubuntu21.29) u7684u89e6u53d1u5668 ...
    u6b63u5728u8bbeu7f6e libirs141:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.17) ...
    u6b63u5728u8bbeu7f6e bind9utils (1:9.10.3.dfsg.P4-8ubuntu1.17) ...
    u6b63u5728u8bbeu7f6e bind9 (1:9.10.3.dfsg.P4-8ubuntu1.17) ...
    u6b63u5728u6dfbu52a0u7ec4"bind" (GID 120)...
    u5b8cu6210u3002
    u6b63u5728u6dfbu52a0u7cfbu7edfu7528u6237"bind" (UID 114)...
    u6b63u5728u5c06u65b0u7528u6237"bind" (UID 114)u6dfbu52a0u5230u7ec4"bind"...
    u65e0u6cd5u521bu5efau4e3bu76eeu5f55"/var/cache/bind"
    wrote key file "/etc/bind/rndc.key"
    #
    invoke-rc.d: could not determine current runlevel
    invoke-rc.d: policy-rc.d denied execution of start.
    u6b63u5728u8bbeu7f6e bind9-doc (1:9.10.3.dfsg.P4-8ubuntu1.17) ...
    u6b63u5728u5904u7406u7528u4e8e libc-bin (2.23-0ubuntu11.2) u7684u89e6u53d1u5668 ...
    u6b63u5728u5904u7406u7528u4e8e systemd (229-4ubuntu21.29) u7684u89e6u53d1u5668 ...
    shiyanlou:~/ $ sudo vi /etc/default/bind9 [16:36:47]
    shiyanlou:~/ $ ifconfig -a [16:37:18]
    eth0 Link encap:u4ee5u592au7f51 u786cu4ef6u5730u5740 02:42:c0:a8:2a:05
    inet u5730u5740:192.168.42.5 u5e7fu64ad:192.168.42.255 u63a9u7801:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 u8dc3u70b9u6570:1
    u63a5u6536u6570u636eu5305:2002 u9519u8bef:0 u4e22u5f03:0 u8fc7u8f7d:0 u5e27u6570:0
    u53d1u9001u6570u636eu5305:2266 u9519u8bef:0 u4e22u5f03:0 u8fc7u8f7d:0 u8f7du6ce2:0
    u78b0u649e:0 u53d1u9001u961fu5217u957fu5ea6:0
    u63a5u6536u5b57u8282:934310 (934.3 KB) u53d1u9001u5b57u8282:4823392 (4.8 MB)

    lo Link encap:u672cu5730u73afu56de
    inet u5730u5740:127.0.0.1 u63a9u7801:255.0.0.0
    UP LOOPBACK RUNNING MTU:65536 u8dc3u70b9u6570:1
    u63a5u6536u6570u636eu5305:0 u9519u8bef:0 u4e22u5f03:0 u8fc7u8f7d:0 u5e27u6570:0
    u53d1u9001u6570u636eu5305:0 u9519u8bef:0 u4e22u5f03:0 u8fc7u8f7d:0 u8f7du6ce2:0
    u78b0u649e:0 u53d1u9001u961fu5217u957fu5ea6:1000
    u63a5u6536u5b57u8282:0 (0.0 B) u53d1u9001u5b57u8282:0 (0.0 B)

    shiyanlou:~/ $ ping -c 3 192.168.42.1 [16:37:22]
    PING 192.168.42.1 (192.168.42.1) 56(84) bytes of data.
    64 bytes from 192.168.42.1: icmp_seq=1 ttl=64 time=0.072 ms
    64 bytes from 192.168.42.1: icmp_seq=2 ttl=64 time=0.049 ms
    64 bytes from 192.168.42.1: icmp_seq=3 ttl=64 time=0.050 ms

    --- 192.168.42.1 ping statistics ---
    3 packets transmitted, 3 received, 0% packet loss, time 2055ms
    rtt min/avg/max/mdev = 0.049/0.057/0.072/0.010 ms
    shiyanlou:~/ $ cat /etc/bind/named.conf [16:38:10]
    // 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";
    shiyanlou:~/ $ sudo vi /etc/bind/named.conf.options [16:38:32]
    shiyanlou:~/ $ sudo vi /etc/bind/named.conf.options [16:43:23]
    shiyanlou:~/ $ sudo vi /etc/bind/named.conf.local [16:46:38]
    shiyanlou:~/ $ sudo mkdir /etc/bind/zones [16:49:14]
    shiyanlou:~/ $ sudo cp /etc/bind/db.local /etc/bind/zones/db.shiyanlou.example.com
    shiyanlou:~/ $ sudo vi /etc/bind/zones/db.shiyanlou.example.com [16:50:40]
    shiyanlou:~/ $ sudo cp /etc/bind/db.127 /etc/bind/zones/db.192.168 [16:54:00]
    shiyanlou:~/ $ sudo vi $ [16:54:28]
    shiyanlou:~/ $ sudo vi /etc/bind/zones/db.192.168 [16:54:35]
    shiyanlou:~/ $ sudo named-checkconf [16:58:04]
    /etc/bind/named.conf.options:6: missing ';' before 'options'
    /etc/bind/named.conf:11: missing ';' before 'include'
    shiyanlou:~/ $ sudo vim /etc/bind/named.conf.options [16:58:47]
    shiyanlou:~/ $ sudo named-checkconf [16:59:16]
    /etc/bind/named.conf:11: missing ';' before 'include'
    shiyanlou:~/ $ sudo vim /etc/bind/named.conf [16:59:18]
    shiyanlou:~/ $ sudo vim /etc/bind/named.conf [16:59:47]
    shiyanlou:~/ $ sudo vim /etc/bind/named.conf [17:00:00]
    shiyanlou:~/ $ sudo vim /etc/bind/named.conf.local [17:00:16]
    shiyanlou:~/ $ sudo named-checkconf [17:00:28]
    shiyanlou:~/ $ sudo serviice bind9 restart [17:00:30]
    sudo: serviiceuff1au627eu4e0du5230u547du4ee4
    shiyanlou:~/ $ sudo service bind9 restart [17:00:39]
    * Stopping domain name service... bind9 rndc: connect failed: 127.0.0.1#953: connection refused
    [ OK ]
    * Starting domain name service... bind9 [ OK ]
    shiyanlou:~/ $ sudo service bind9 status [17:00:45]
    * bind9 is running
    shiyanlou:~/ $ sudo vi /etc/resolv.conf [17:00:52]
    shiyanlou:~/ $ sudo named -g [17:01:32]
    09-Feb-2021 17:01:42.800 starting BIND 9.10.3-P4-Ubuntu <id:ebd72b3> -g
    09-Feb-2021 17:01:42.800 built with '--prefix=/usr' '--mandir=/usr/share/man' '--libdir=/usr/lib/x86_64-linux-gnu' '--infodir=/usr/share/info' '--sysconfdir=/etc/bind' '--localstatedir=/' '--enable-threads' '--enable-largefile' '--with-libtool' '--enable-shared' '--enable-static' '--with-openssl=/usr' '--with-gssapi=/usr' '--with-gnu-ld' '--with-geoip=/usr' '--with-atf=no' '--enable-ipv6' '--enable-rrl' '--enable-filter-aaaa' '--enable-native-pkcs11' '--with-pkcs11=/usr/lib/x86_64-linux-gnu/softhsm/libsofthsm2.so' 'CFLAGS=-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -fno-strict-aliasing -fno-delete-null-pointer-checks -DNO_VERSION_DATE' 'LDFLAGS=-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2 -DDIG_SIGCHASE'
    09-Feb-2021 17:01:42.800 ----------------------------------------------------
    09-Feb-2021 17:01:42.800 BIND 9 is maintained by Internet Systems Consortium,
    09-Feb-2021 17:01:42.801 Inc. (ISC), a non-profit 501(c)(3) public-benefit
    09-Feb-2021 17:01:42.801 corporation. Support and training for BIND 9 are
    09-Feb-2021 17:01:42.801 available at https://www.isc.org/support
    09-Feb-2021 17:01:42.801 ----------------------------------------------------
    09-Feb-2021 17:01:42.801 found 4 CPUs, using 4 worker threads
    09-Feb-2021 17:01:42.801 using 2 UDP listeners per interface
    09-Feb-2021 17:01:42.801 using up to 4096 sockets
    09-Feb-2021 17:01:42.805 loading configuration from '/etc/bind/named.conf'
    09-Feb-2021 17:01:42.806 reading built-in trusted keys from file '/etc/bind/bind.keys'
    09-Feb-2021 17:01:42.806 initializing GeoIP Country (IPv4) (type 1) DB
    09-Feb-2021 17:01:42.806 GEO-106FREE 20160408 Bu
    09-Feb-2021 17:01:42.806 initializing GeoIP Country (IPv6) (type 12) DB
    09-Feb-2021 17:01:42.806 GEO-106FREE 20160408 Bu
    09-Feb-2021 17:01:42.806 GeoIP City (IPv4) (type 2) DB not available
    09-Feb-2021 17:01:42.806 GeoIP City (IPv4) (type 6) DB not available
    09-Feb-2021 17:01:42.806 GeoIP City (IPv6) (type 30) DB not available
    09-Feb-2021 17:01:42.806 GeoIP City (IPv6) (type 31) DB not available
    09-Feb-2021 17:01:42.806 GeoIP Region (type 3) DB not available
    09-Feb-2021 17:01:42.806 GeoIP Region (type 7) DB not available
    09-Feb-2021 17:01:42.806 GeoIP ISP (type 4) DB not available
    09-Feb-2021 17:01:42.806 GeoIP Org (type 5) DB not available
    09-Feb-2021 17:01:42.806 GeoIP AS (type 9) DB not available
    09-Feb-2021 17:01:42.806 GeoIP Domain (type 11) DB not available
    09-Feb-2021 17:01:42.806 GeoIP NetSpeed (type 10) DB not available
    09-Feb-2021 17:01:42.806 using default UDP/IPv4 port range: [32768, 60999]
    09-Feb-2021 17:01:42.806 using default UDP/IPv6 port range: [32768, 60999]
    09-Feb-2021 17:01:42.807 listening on IPv6 interfaces, port 53
    09-Feb-2021 17:01:42.830 listening on IPv4 interface eth0, 192.168.42.5#53
    09-Feb-2021 17:01:42.831 binding TCP socket: address in use
    09-Feb-2021 17:01:42.831 generating session key for dynamic DNS
    09-Feb-2021 17:01:42.831 sizing zone task pool based on 7 zones
    09-Feb-2021 17:01:42.835 using built-in root key for view _default
    09-Feb-2021 17:01:42.835 set up managed keys zone for view _default, file 'managed-keys.bind'
    09-Feb-2021 17:01:42.835 automatic empty zone: 10.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.835 automatic empty zone: 16.172.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.835 automatic empty zone: 17.172.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.835 automatic empty zone: 18.172.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.835 automatic empty zone: 19.172.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.835 automatic empty zone: 20.172.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.835 automatic empty zone: 21.172.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.835 automatic empty zone: 22.172.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.835 automatic empty zone: 23.172.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.835 automatic empty zone: 24.172.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.835 automatic empty zone: 25.172.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.835 automatic empty zone: 26.172.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.835 automatic empty zone: 27.172.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.835 automatic empty zone: 28.172.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 29.172.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 30.172.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 31.172.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 64.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 65.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 66.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 67.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 68.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 69.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 70.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 71.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 72.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 73.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 74.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 75.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 76.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 77.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 78.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 79.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 80.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 81.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 82.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 83.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 84.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 85.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 86.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 87.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 88.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 89.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 90.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 91.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 92.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 93.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 94.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 95.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 96.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 97.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.836 automatic empty zone: 98.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 99.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 100.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 101.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 102.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 103.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 104.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 105.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 106.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 107.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 108.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 109.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 110.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 111.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 112.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 113.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 114.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 115.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 116.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 117.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 118.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 119.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 120.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 121.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 122.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 123.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 124.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 125.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 126.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 127.100.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 254.169.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 2.0.192.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 100.51.198.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 113.0.203.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 255.255.255.255.IN-ADDR.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA
    09-Feb-2021 17:01:42.837 automatic empty zone: D.F.IP6.ARPA
    09-Feb-2021 17:01:42.838 automatic empty zone: 8.E.F.IP6.ARPA
    09-Feb-2021 17:01:42.838 automatic empty zone: 9.E.F.IP6.ARPA
    09-Feb-2021 17:01:42.838 automatic empty zone: A.E.F.IP6.ARPA
    09-Feb-2021 17:01:42.838 automatic empty zone: B.E.F.IP6.ARPA
    09-Feb-2021 17:01:42.838 automatic empty zone: 8.B.D.0.1.0.0.2.IP6.ARPA
    09-Feb-2021 17:01:42.838 automatic empty zone: EMPTY.AS112.ARPA
    09-Feb-2021 17:01:42.840 configuring command channel from '/etc/bind/rndc.key'
    09-Feb-2021 17:01:42.840 open: /etc/bind/rndc.key: permission denied
    09-Feb-2021 17:01:42.840 couldn't add command channel 127.0.0.1#953: permission denied
    09-Feb-2021 17:01:42.840 configuring command channel from '/etc/bind/rndc.key'
    09-Feb-2021 17:01:42.840 open: /etc/bind/rndc.key: permission denied
    09-Feb-2021 17:01:42.840 couldn't add command channel ::1#953: permission denied
    09-Feb-2021 17:01:42.840 not using config file logging statement for logging due to -g option
    09-Feb-2021 17:01:42.841 managed-keys-zone: journal file is out of date: removing journal file
    09-Feb-2021 17:01:42.841 managed-keys-zone: loaded serial 2
    09-Feb-2021 17:01:42.843 zone 0.in-addr.arpa/IN: loaded serial 1
    09-Feb-2021 17:01:42.845 zone shiyanlou.example.com/IN: has no NS records
    09-Feb-2021 17:01:42.845 zone shiyanlou.example.com/IN: not loaded due to errors.
    09-Feb-2021 17:01:42.848 zone localhost/IN: loaded serial 2
    09-Feb-2021 17:01:42.848 zone 127.in-addr.arpa/IN: loaded serial 1
    09-Feb-2021 17:01:42.848 zone 168.192.in-addr.arpa/IN: has no NS records
    09-Feb-2021 17:01:42.848 zone 168.192.in-addr.arpa/IN: not loaded due to errors.
    09-Feb-2021 17:01:42.848 zone 255.in-addr.arpa/IN: loaded serial 1
    09-Feb-2021 17:01:42.849 all zones loaded
    09-Feb-2021 17:01:42.849 running

    ^C09-Feb-2021 17:01:45.489 shutting down
    09-Feb-2021 17:01:45.490 no longer listening on ::#53
    09-Feb-2021 17:01:45.490 no longer listening on 192.168.42.5#53
    09-Feb-2021 17:01:45.494 exiting
    shiyanlou:~/ $ sudo service bind9 status [17:01:45]
    * bind9 is not running
    shiyanlou:~/ $ sudo service bind9 restart [17:01:48]
    * Stopping domain name service... bind9 waiting for pid 1759 to die
    [ OK ]
    * Starting domain name service... bind9 [ OK ]
    shiyanlou:~/ $ sudo service bind9 status [17:01:56]
    * bind9 is running
    shiyanlou:~/ $ nslookup ns1.shiyanlou.example.com [17:01:59]
    Server: 192.168.42.5
    Address: 192.168.42.5#53

    ** server can't find ns1.shiyanlou.example.com: SERVFAIL

    shiyanlou:~/ $ nslookup host1.shiyanlou.example.com [17:02:21]
    Server: 192.168.42.5
    Address: 192.168.42.5#53

    ** server can't find host1.shiyanlou.example.com: SERVFAIL

    shiyanlou:~/ $ [17:02:43]

    菜鸟的自白
  • 相关阅读:
    SpringMVC异常处理
    SpringMVC参数绑定、Post乱码解决方法
    @RequestMapping与controller方法返回值介绍
    Git学习总结(标签管理)
    Git分支管理
    远程仓库
    可用来修改bean对象的BeanPostProcessor
    @Configuration的使用
    Spring配置:用context:property-placeholder替换PropertyPlaceholderConfigurer
    深入剖析 Spring 框架的 BeanFactory
  • 原文地址:https://www.cnblogs.com/lzjloveit/p/14391724.html
Copyright © 2011-2022 走看看